You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2012/10/02 23:25:15 UTC
svn commit: r1393191 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS
modules/cache/mod_cache.c
Author: minfrin
Date: Tue Oct 2 21:25:14 2012
New Revision: 1393191
URL: http://svn.apache.org/viewvc?rev=1393191&view=rev
Log:
mod_cache: Wrong content type and character set when mod_cache serves
stale content because of a proxy error. PR 53539. Correction to r1361153.
trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1373447
2.4.x patch: trunk patch works.
+1: rjung, jim, minfrin
Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/CHANGES
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c
Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1373447,1388648,1393033,1393058,1393152
Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1393191&r1=1393190&r2=1393191&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Tue Oct 2 21:25:14 2012
@@ -2,6 +2,10 @@
Changes with Apache 2.4.4
+ *) 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]
+
*) mod_proxy_ajp: Fix crash in packet dump code when logging
with LogLevel trace7 or trace8. PR 53730. [Rainer Jung]
Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1393191&r1=1393190&r2=1393191&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Tue Oct 2 21:25:14 2012
@@ -89,13 +89,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_cache: Wrong content type and character set when
- mod_cache serves stale content because of a proxy error.
- PR 53539. Correction to r1361153.
- trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1373447
- 2.4.x patch: trunk patch works.
- +1: rjung, jim, minfrin
-
* mod_proxy: Avoid double slash with "ProxyPassReverse / ..." cases
trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1386576
http://svn.apache.org/viewvc?view=revision&revision=1386578
Modified: httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c?rev=1393191&r1=1393190&r2=1393191&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c (original)
+++ httpd/httpd/branches/2.4.x/modules/cache/mod_cache.c Tue Oct 2 21:25:14 2012
@@ -573,6 +573,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;
@@ -1655,9 +1659,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)