httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1132816 - /httpd/httpd/trunk/modules/cache/mod_cache.c
Date Mon, 06 Jun 2011 22:44:31 GMT
Author: minfrin
Date: Mon Jun  6 22:44:31 2011
New Revision: 1132816

URL: http://svn.apache.org/viewvc?rev=1132816&view=rev
Log:
mod_cache: Ensure that r->content_type is set when serving stale
content in response to a failed attempt to revalidate.

Modified:
    httpd/httpd/trunk/modules/cache/mod_cache.c

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1132816&r1=1132815&r2=1132816&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Mon Jun  6 22:44:31 2011
@@ -843,6 +843,9 @@ static int cache_save_filter(ap_filter_t
 
             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)



Mime
View raw message