From 960c5788f805bd8e5512f97d8c0439e96c4a17fa Mon Sep 17 00:00:00 2001 From: Ian Holsman Date: Mon, 20 May 2002 00:07:33 +0000 Subject: [PATCH] content with "Content-Encoding" header, content is encoded. But mod_deflate does not check it. It cause to encode content twice. This problem is reproducable by getting encoded content via mod_proxy. Patch Contributed by kaz@asada.sytes.net (ASADA Kazuhisa) Bug #9222 Thanks Kazuhisa git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95181 13f79535-47bb-0310-9956-ffa450edef68 --- modules/filters/mod_deflate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 7acae7d1df..2547cd2432 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -273,6 +273,12 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, return ap_pass_brigade(f->next, bb); } + /* content is already encoded, so don't encode it again */ + if (apr_table_get(r->headers_in, "Content-Encoding")) { + ap_remove_output_filter(f); + return ap_pass_brigade(f->next, bb); + } + /* if they don't have the line, then they can't play */ accepts = apr_table_get(r->headers_in, "Accept-Encoding"); if (accepts == NULL) { -- 2.40.0