From: Jim Jagielski Date: Fri, 17 Apr 2009 13:36:50 +0000 (+0000) Subject: Approved backedports: X-Git-Tag: 2.2.12~173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d6dfd0bb19978be12af5b456c6ac04416003776;p=thirdparty%2Fapache%2Fhttpd.git Approved backedports: - 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 --- diff --git a/CHANGES b/CHANGES index 07f7bb1c535..5838153e17d 100644 --- 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 bf8328512d6..6a95b0091cb 100644 --- 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 diff --git a/modules/cache/mod_disk_cache.c b/modules/cache/mod_disk_cache.c index 12dd841e032..70a804b8955 100644 --- a/modules/cache/mod_disk_cache.c +++ b/modules/cache/mod_disk_cache.c @@ -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; diff --git a/modules/cache/mod_mem_cache.c b/modules/cache/mod_mem_cache.c index b1f76e799ae..7bdaeac9653 100644 --- a/modules/cache/mod_mem_cache.c +++ b/modules/cache/mod_mem_cache.c @@ -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 */