httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject svn commit: r649460 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_util.c modules/cache/mod_cache.c
Date Fri, 18 Apr 2008 11:05:36 GMT
Author: dirkx
Date: Fri Apr 18 04:05:25 2008
New Revision: 649460

URL: http://svn.apache.org/viewvc?rev=649460&view=rev
Log:
Centralize the error-header collapsing done when sending out cached replies. Mark the change
in CHANGES as it may have unforseen fall out and/or may need to be reverted or done more subtle.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/cache/cache_util.c
    httpd/httpd/trunk/modules/cache/mod_cache.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=649460&r1=649459&r2=649460&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Apr 18 04:05:25 2008
@@ -2,6 +2,11 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) ap_cache_cacheable_headers_out() will (now) always
+     merge an error heaeders _before_ clearing them and _before_
+     merging in the actual entity headers and doing normal
+     hop-by-hop cleansing. [Dirk-Willem van Gulik].
+
   *) cache: retire ap_cache_cacheable_hdrs_out() which was used
      for both in- and out-put headers; and replace it by a single
      ap_cache_cacheable_headers() wrapped in a in- and out-put

Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=649460&r1=649459&r2=649460&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Fri Apr 18 04:05:25 2008
@@ -654,6 +654,11 @@
 {
     apr_table_t *headers_out;
 
+    headers_out = apr_table_overlay(r->pool, headers_out,
+                                        r->err_headers_out);
+
+    apr_table_clear(r->err_headers_out);
+
     headers_out = ap_cache_cacheable_headers(r->pool, r->headers_out,
                                                   r->server);
 
@@ -662,9 +667,6 @@
         apr_table_setn(headers_out, "Content-Type",
                        ap_make_content_type(r, r->content_type));
     }
-
-    headers_out = apr_table_overlay(r->pool, headers_out,
-                                    r->err_headers_out);
 
     return headers_out;
 }

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=649460&r1=649459&r2=649460&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Fri Apr 18 04:05:25 2008
@@ -757,15 +757,7 @@
          * err_headers_out and we also need to strip any hop-by-hop
          * headers that might have snuck in.
          */
-        r->headers_out = apr_table_overlay(r->pool, r->headers_out,
-                                           r->err_headers_out);
-
-        /* XXX check -- we're not patching up content-type - i.e. this
-         *     propably should be ap_cache_cacheable_headers_out().
-         */
-        r->headers_out = ap_cache_cacheable_headers(r->pool, r->headers_out,
-                                                     r->server);
-        apr_table_clear(r->err_headers_out);
+        r->headers_out = ap_cache_cacheable_headers_out(r);
 
         /* Merge in our cached headers.  However, keep any updated values. */
         ap_cache_accept_headers(cache->handle, r, 1);



Mime
View raw message