From: Ruediger Pluem Date: Mon, 15 Dec 2008 20:22:07 +0000 (+0000) Subject: * Fix r->content_encoding in deflate_out_filter if it was set before. X-Git-Tag: 2.3.1~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2143e63f59e983031e47ececa37ac83b4e8e37f;p=thirdparty%2Fapache%2Fhttpd.git * Fix r->content_encoding in deflate_out_filter if it was set before. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726791 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index de1a57d78a3..809efd86cfe 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -584,6 +584,11 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, else { apr_table_mergen(r->headers_out, "Content-Encoding", "gzip"); } + /* Fix r->content_encoding if it was set before */ + if (r->content_encoding) { + r->content_encoding = apr_table_get(r->headers_out, + "Content-Encoding"); + } apr_table_unset(r->headers_out, "Content-Length"); apr_table_unset(r->headers_out, "Content-MD5"); deflate_check_etag(r, "gzip");