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
[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
* If gzip is present, don't gzip again. (We could, but let's not.)
*/
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;