From: Graham Leggett Date: Mon, 6 Jun 2011 22:44:31 +0000 (+0000) Subject: mod_cache: Ensure that r->content_type is set when serving stale X-Git-Tag: 2.3.13~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26f144c3d2c2b052cecad1916bf59d319551cfb9;p=apache mod_cache: Ensure that r->content_type is set when serving stale content in response to a failed attempt to revalidate. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132816 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 83abb634cb..40daced9eb 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -843,6 +843,9 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in) r->headers_out = cache->stale_handle->resp_hdrs; + ap_set_content_type(r, apr_table_get( + cache->stale_handle->resp_hdrs, "Content-Type")); + /* add a revalidation warning */ warn_head = apr_table_get(r->err_headers_out, "Warning"); if ((warn_head == NULL) || ((warn_head != NULL)