]> granicus.if.org Git - apache/commitdiff
mod_cache: r->err_headers_out is not merged into
authorGraham Leggett <minfrin@apache.org>
Sun, 27 Sep 2015 11:33:27 +0000 (11:33 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 27 Sep 2015 11:33:27 +0000 (11:33 +0000)
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

CHANGES
STATUS
modules/cache/cache_util.c
modules/cache/mod_cache.c

diff --git a/CHANGES b/CHANGES
index d5cd756839e4d7b13982805aee8eb1ecc0f2870c..d0d91112e063f96a4c190dd0adae5b79491301d2 100644 (file)
--- 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 8b52391ae0374a28afc5604c44c8e55cbdf22b12..964d6a22f51713dd1431aed0049fe1eafc86180a 100644 (file)
--- 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:
index b7454ad6a1540b4427f0cd42c7f1800eb3af9a94..070a5f0d4c11a7528845d416a140154947a31efc 100644 (file)
@@ -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")) {
index b95f0a8a5a42c96d53b1fb314d6f6299b06645f4..091d52706f5a37df7ec9ca5f12fac478076ca36d 100644 (file)
@@ -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 */