httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1704392 - in /httpd/httpd/trunk/modules/cache: cache_util.c mod_cache.c
Date Mon, 21 Sep 2015 19:15:47 GMT
Author: elu
Date: Mon Sep 21 19:15:47 2015
New Revision: 1704392

URL: http://svn.apache.org/viewvc?rev=1704392&view=rev
Log:
Stop destroying headers when passing through the cache filter

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

Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=1704392&r1=1704391&r2=1704392&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Mon Sep 21 19:15:47 2015
@@ -1272,7 +1272,6 @@ apr_table_t *cache_merge_headers_out(req
 
     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")) {

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1704392&r1=1704391&r2=1704392&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Mon Sep 21 19:15:47 2015
@@ -122,12 +122,10 @@ static int cache_quick_handler(request_r
         return DECLINED;
     }
 
-    /* find certain cache controlling headers */
+    /* Since we're in the quick handler, authorization will not have been
+     * processed through normal channels yet. Just decline the request if
+     * it's trying to authorize. */
     auth = apr_table_get(r->headers_in, "Authorization");
-
-    /* First things first - does the request allow us to return
-     * cached information at all? If not, just decline the request.
-     */
     if (auth) {
         return DECLINED;
     }
@@ -1462,6 +1460,7 @@ static apr_status_t cache_save_filter(ap
          * 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 */



Mime
View raw message