Commit 99985bd2 authored by Ian Holsman's avatar Ian Holsman
Browse files

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
parent 77133b88
Loading
Loading
Loading
Loading
+6 −0
Changes for modules/filters/mod_deflate.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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) {