]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Commit promoted backport of PR46401
authorPaul J. Reder <rederpj@apache.org>
Thu, 18 Dec 2008 17:14:53 +0000 (17:14 +0000)
committerPaul J. Reder <rederpj@apache.org>
Thu, 18 Dec 2008 17:14:53 +0000 (17:14 +0000)
 *) mod_cache: Correctly save Content-Encoding of cachable entity. PR 46401
    [Dan Poirier <poirier pobox.com>]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@727767 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 d5b2c27fe190f8c92470703fdadb78113fe2d885..d656b5818822dd2c3c708938d766be1ffbb588f8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.12
 
+  *) mod_cache: Correctly save Content-Encoding of cachable entity. PR 46401
+     [Dan Poirier <poirier pobox.com>]
+
   *) Output -M and -S dumps (modules and vhosts) to stdout instead of stderr.
      PR 42571 and PR 44266 (dup).  [Dan Poirier <poirier pobox.com>]
 
diff --git a/STATUS b/STATUS
index de91f3fe6a2d0d7967559fe2d764804fde2cbaba..c22597128d99aa8d44c62fff0163007e23089a3f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -86,14 +86,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * mod_cache: Correctly save Content-Encoding of cachable entity. PR 46401
-   [Dan Poirier <poirier pobox.com>]
-   Trunk version of patch (committed by rpluem):
-      http://svn.apache.org/viewvc?view=rev&revision=726796
-   Backport version of patch:
-      http://people.apache.org/~rederpj/backport_PR46401_cache_Content-Encoding.diff
-   +1: rederpj, rpluem, covener 
-
  * mod_ldap: Avoid a segfault when result->rc is checked in uldap_connection_init
    when result is NULL. This could happen if LDAP initialization failed.
    PR 45994.  [Dan Poirier <poirier pobox.com>]
index 4148b373ca2aaa7fb7842958a9636e11dea9ab52..fd7cc6c893bb05555c91018ca8adb0376a2dc587 100644 (file)
@@ -916,6 +916,12 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
                            ap_make_content_type(r, r->content_type));
         }
 
+        if (!apr_table_get(headers_out, "Content-Encoding")
+            && r->content_encoding) {
+            apr_table_setn(headers_out, "Content-Encoding",
+                           r->content_encoding);
+        }
+
         headers_out = apr_table_overlay(r->pool, headers_out,
                                         r->err_headers_out);
         rv = store_table(dobj->hfd, headers_out);
index 65f35327b796858823702163cabbad1e227db9d6..b1f76e799aeedd497cc4dce60c49f25c89d99fb4 100644 (file)
@@ -614,6 +614,12 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
                        ap_make_content_type(r, r->content_type));
     }
 
+    if (!apr_table_get(headers_out, "Content-Encoding")
+        && r->content_encoding) {
+        apr_table_setn(headers_out, "Content-Encoding",
+                       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);