diff options
author | André Malo <nd@apache.org> | 2003-03-08 18:08:34 +0100 |
---|---|---|
committer | André Malo <nd@apache.org> | 2003-03-08 18:08:34 +0100 |
commit | 9f21e8b4474f9479bc1edd231efceeb4e73a4495 (patch) | |
tree | 5b97ad828a9f38cef5e8f2b1195952742f29fdd8 | |
parent | use APR_CHECK_APR_DEFINE() where possible (diff) | |
download | apache2-9f21e8b4474f9479bc1edd231efceeb4e73a4495.tar.xz apache2-9f21e8b4474f9479bc1edd231efceeb4e73a4495.zip |
Check also err_headers_out for an already set Content-Encoding:
gzip header. This prevents gzip compressed content from a CGI
script from being compressed once more.
PR: 17797
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98948 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | modules/filters/mod_deflate.c | 12 |
2 files changed, 17 insertions, 0 deletions
@@ -2,6 +2,11 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) mod_deflate: Check also err_headers_out for an already set + Content-Encoding: gzip header. This prevents gzip compressed content + from a CGI script from being compressed once more. PR 17797. + [André Malo] + *) Forward port: Escape special characters (especially control characters) in mod_log_config to make a clear distinction between client-supplied strings (with special characters) and server-side diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index c14b10fff8..db65bd2f24 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -329,6 +329,18 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, */ encoding = apr_table_get(r->headers_out, "Content-Encoding"); if (encoding) { + const char *err_enc; + + err_enc = apr_table_get(r->err_headers_out, "Content-Encoding"); + if (err_enc) { + encoding = apr_pstrcat(r->pool, encoding, ",", err_enc, NULL); + } + } + else { + encoding = apr_table_get(r->err_headers_out, "Content-Encoding"); + } + + if (encoding) { const char *tmp = encoding; token = ap_get_token(r->pool, &tmp, 0); |