]> granicus.if.org Git - apache/commitdiff
* Fix r->content_encoding for inflate_in and inflate_out filters.
authorRuediger Pluem <rpluem@apache.org>
Mon, 15 Dec 2008 20:36:47 +0000 (20:36 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 15 Dec 2008 20:36:47 +0000 (20:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726794 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_deflate.c

index 809efd86cfe4cb39d3ebdaee9748c47d517fa60e..b18fa311fa203beac0c5874f276178f85f23f3cb 100644 (file)
@@ -157,6 +157,15 @@ static int check_gzip(request_rec *r, apr_table_t *hdrs1, apr_table_t *hdrs2)
             }
         }
     }
+    /*
+     * If we have dealt with the headers above but content_encoding was set
+     * before sync it with the new value in the hdrs table as
+     * r->content_encoding takes precedence later on in the http_header_filter
+     * and hence would destroy what we have just set in the hdrs table.
+     */
+    if (hdrs && r->content_encoding) {
+        r->content_encoding = apr_table_get(hdrs, "Content-Encoding");
+    }
     return found;
 }