]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Approved backedports:
authorJim Jagielski <jim@apache.org>
Fri, 17 Apr 2009 13:36:50 +0000 (13:36 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 17 Apr 2009 13:36:50 +0000 (13:36 +0000)
-     http://svn.apache.org/viewvc?view=rev&revision=649162
-     http://svn.apache.org/viewvc?view=rev&revision=649176
-     http://svn.apache.org/viewvc?view=rev&revision=649460

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@765997 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/cache/mod_disk_cache.c
modules/cache/mod_mem_cache.c

diff --git a/CHANGES b/CHANGES
index 07f7bb1c5351a2fe96f5f0066ef6538c44fe0ebe..5838153e17d74c00f8fc8242f4174d6208457f35 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.12
 
+  *) mod_disk_cache/mod_mem_cache: Fix handling of CacheIgnoreHeaders
+     directive to correctly remove headers before storing them.
+     [Lars Eilebrecht]
+
   *) mod_deflate: revert changes in 2.2.8 that caused an invalid
      etag to be emitted for on-the-fly gzip content-encoding.
      PR 39727 will require larger fixes and this fix was far more
diff --git a/STATUS b/STATUS
index bf8328512d66e4ea8ee2db78cad05ce26cd6acc6..6a95b0091cb4dab1a771e5fb2b8b5b289a8871ea 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -95,23 +95,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * mod_disk_cache/mod_mem_cache: the modules currently fail to correctly
-   handle the CacheIgnoreHeaders directive. The issue is that
-   r->err_headers_out gets merged into the headers_out value *after* 
-   ap_cache_cacheable_headers() gets called. So it is not possible to
-   remove headers with CacheIgnoreHeaders when they have been set in
-   r->err_headers_out. This issue does not exist in trunk, as the code
-   related to ap_cache_cacheable_headers() got refactored completely.
-   In trunk the API was changed so this patch is not a full backport
-   from trunk, but just fixes the actual bug.
-   Related patches in trunk:
-     http://svn.apache.org/viewvc?view=rev&revision=649162
-     http://svn.apache.org/viewvc?view=rev&revision=649176
-     http://svn.apache.org/viewvc?view=rev&revision=649460
-   Patch for version 2.2.x:
-     http://people.apache.org/~lars/cacheignoreheaders-fix.patch
-   +1: lars, minfrin, rpluem, jim
-
  * mod_proxy_ajp: The remote port information was forgotten from
    the builtin data of the AJP 13 protocol.  Since the servlet spec
    allows to retrieve it via getRemotePort(), we provide the port to
index 12dd841e032567e13472b1f6ee391bd3cd58c26a..70a804b8955d47b75a7c7bac2d1626fbf3597f5f 100644 (file)
@@ -916,7 +916,9 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
     if (r->headers_out) {
         apr_table_t *headers_out;
 
-        headers_out = ap_cache_cacheable_hdrs_out(r->pool, r->headers_out,
+        headers_out = apr_table_overlay(r->pool, r->headers_out,
+                                        r->err_headers_out);
+        headers_out = ap_cache_cacheable_hdrs_out(r->pool, headers_out,
                                                   r->server);
 
         if (!apr_table_get(headers_out, "Content-Type")
@@ -931,8 +933,6 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
                            r->content_encoding);
         }
 
-        headers_out = apr_table_overlay(r->pool, headers_out,
-                                        r->err_headers_out);
         rv = store_table(dobj->hfd, headers_out);
         if (rv != APR_SUCCESS) {
             return rv;
index b1f76e799aeedd497cc4dce60c49f25c89d99fb4..7bdaeac96532c2794d1f05e9a894668f7e21c0bb 100644 (file)
@@ -604,7 +604,9 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
     mobj->req_hdrs = deep_table_copy(mobj->pool, r->headers_in);
 
     /* Precompute how much storage we need to hold the headers */
-    headers_out = ap_cache_cacheable_hdrs_out(r->pool, r->headers_out,
+    headers_out = apr_table_overlay(r->pool, r->headers_out,
+                                    r->err_headers_out);
+    headers_out = ap_cache_cacheable_hdrs_out(r->pool, headers_out,
                                               r->server);
 
     /* If not set in headers_out, set Content-Type */
@@ -620,7 +622,6 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
                        r->content_encoding);
     }
 
-    headers_out = apr_table_overlay(r->pool, headers_out, r->err_headers_out);
     mobj->header_out = deep_table_copy(mobj->pool, headers_out);
 
     /* Init the info struct */