From: Graham Leggett Date: Sun, 27 Sep 2015 11:33:27 +0000 (+0000) Subject: mod_cache: r->err_headers_out is not merged into X-Git-Tag: 2.4.17~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e20c31224bccf36cda48ef99773bd19f22a52202;p=thirdparty%2Fapache%2Fhttpd.git mod_cache: r->err_headers_out is not merged into r->headers when mod_cache is enabled and the response is cached for the first time. Submitted by: elu Reviewed by: ylavic, minfrin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1705528 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index d5cd756839e..d0d91112e06 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.4.17 + *) mod_cache: r->err_headers_out is not merged into + r->headers when mod_cache is enabled and the response + is cached for the first time. [Edward Lu] + *) mod_slotmem_shm: Fix slots/SHM files names on restart for systems that can't create new (clear) slots while previous children gracefully stopping still use the old ones (e.g. Windows, OS2). mod_proxy_balancer failed to diff --git a/STATUS b/STATUS index 8b52391ae03..964d6a22f51 100644 --- a/STATUS +++ b/STATUS @@ -109,15 +109,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_cache: r->err_headers_out is not merged into - r->headers when mod_cache is enabled and the response - is cached for the first time. - trunk patch: http://svn.apache.org/r1704392 - http://svn.apache.org/r1704395 - 2.4.x patch: trunk works - +1: elu, ylavic, minfrin - ylavic: possibly with a CHANGES entry - PATCHES PROPOSED TO BACKPORT FROM TRUNK: diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c index b7454ad6a15..070a5f0d4c1 100644 --- a/modules/cache/cache_util.c +++ b/modules/cache/cache_util.c @@ -1254,7 +1254,6 @@ apr_table_t *cache_merge_headers_out(request_rec *r) headers_out = apr_table_overlay(r->pool, r->headers_out, r->err_headers_out); - apr_table_clear(r->err_headers_out); if (r->content_type && !apr_table_get(headers_out, "Content-Type")) { diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index b95f0a8a5a4..091d52706f5 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -1452,6 +1452,7 @@ static apr_status_t cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in) * forward all of them to the client, including non-cacheable ones). */ r->headers_out = cache_merge_headers_out(r); + apr_table_clear(r->err_headers_out); /* Merge in our cached headers. However, keep any updated values. */ /* take output, overlay on top of cached */