"r->content_encoding" should be checked to avoid compressing a compressed file, when an internal redirection occurs by mod_negotiation/mod_rewrite, or "*.{html,txt,etc}.gz" is requested directly. --- httpd-2.0/modules/filters/mod_deflate.c Wed Mar 12 03:11:33 2003 +++ httpd-2.0/modules/filters/mod_deflate.c Wed May 14 14:55:40 2003 @@ -340,6 +340,12 @@ encoding = apr_table_get(r->err_headers_out, "Content-Encoding"); } + if (r->content_encoding) { + encoding = encoding ? apr_pstrcat(r->pool, encoding, ",", + r->content_encoding, NULL) + : r->content_encoding; + } + if (encoding) { const char *tmp = encoding;
Yes, you're right. I've just committed your patch and proposed it for backport into the stable branch. Thanks for your report and thanks for using Apache.