From 26f144c3d2c2b052cecad1916bf59d319551cfb9 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Mon, 6 Jun 2011 22:44:31 +0000 Subject: [PATCH] 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 --- modules/cache/mod_cache.c | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.40.0