You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2012/08/15 17:06:24 UTC
svn commit: r1373447 - in /httpd/httpd/trunk: CHANGES
modules/cache/mod_cache.c
Author: rjung
Date: Wed Aug 15 15:06:24 2012
New Revision: 1373447
URL: http://svn.apache.org/viewvc?rev=1373447&view=rev
Log:
Wrong content type and character set when
mod_cache serves stale content because of
a proxy error.
PR 53539.
Correction to r1361153.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/cache/mod_cache.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1373447&r1=1373446&r2=1373447&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Aug 15 15:06:24 2012
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_cache: Wrong content type and character set when
+ mod_cache serves stale content because of a proxy error.
+ PR 53539. [Rainer Jung, Ruediger Pluem]
+
*) core: Be less strict when checking whether Content-Type is set to
"application/x-www-form-urlencoded" when parsing POST data,
or we risk losing data with an appended charset. PR 53698
Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1373447&r1=1373446&r2=1373447&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Wed Aug 15 15:06:24 2012
@@ -604,6 +604,10 @@ static apr_status_t cache_out_filter(ap_
apr_bucket_brigade *bb = apr_brigade_create(r->pool,
r->connection->bucket_alloc);
+ /* restore content type of cached response */
+ ap_set_content_type(r, apr_table_get(cache->handle->resp_hdrs,
+ "Content-Type"));
+
/* restore status of cached response */
r->status = cache->handle->cache_obj->info.status;
@@ -1686,9 +1690,6 @@ static void cache_insert_error_filter(re
r->err_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)