From: Justin Erenkrantz Date: Sat, 29 May 2004 03:34:17 +0000 (+0000) Subject: Fix bug in mod_deflate that unconditionally sent deflate'd output even when X-Git-Tag: pre_ajp_proxy~210 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d0a42a80c8d16c11e345733c8f6889bd1010921;p=apache Fix bug in mod_deflate that unconditionally sent deflate'd output even when Accept-Encoding is not present. Reported by Roy Fielding for http://cvs.apache.org/viewcvs/ with Safari. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103803 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 1e62eb5090..d5f81b8d37 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) Fix bug in mod_deflate that unconditionally sent deflate'd output + even when Accept-Encoding is not present. [Justin Erenkrantz] + *) Pass environment variables through to piped loggers, resolving a regression since 1.3. [Ken Coar, Jeff Trawick] diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 2dd1522e1e..07464fe6d5 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -340,7 +340,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, /* force-gzip will just force it out regardless if the browser * can actually do anything with it. */ - if (apr_table_get(r->subprocess_env, "force-gzip") != NULL) { + if (!apr_table_get(r->subprocess_env, "force-gzip")) { const char *accepts; /* if they don't have the line, then they can't play */ accepts = apr_table_get(r->headers_in, "Accept-Encoding");