From: Ruediger Pluem Date: Mon, 15 Dec 2008 20:36:47 +0000 (+0000) Subject: * Fix r->content_encoding for inflate_in and inflate_out filters. X-Git-Tag: 2.3.1~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6546dabca39412e307e7d3fdd9b1da812da4176d;p=thirdparty%2Fapache%2Fhttpd.git * Fix r->content_encoding for inflate_in and inflate_out filters. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726794 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 809efd86cfe..b18fa311fa2 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -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; }