Commit 9f12c96b authored by Graham Leggett's avatar Graham Leggett
Browse files

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
parent af481b3c
Loading
Loading
Loading
Loading
+3 −0
Changes for modules/cache/mod_cache.c: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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)