From: Nick Kew Date: Mon, 6 Aug 2007 13:53:35 +0000 (+0000) Subject: mod_deflate - discussion on dev@ X-Git-Tag: 2.3.0~1642 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b55bb3e1ab6e647d152d9511e535bfe13572f39;p=apache mod_deflate - discussion on dev@ Postpone unsetting of headers until after first get_brigade from upstream git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@563133 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 3c4f8d7d45..365a8378fe 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -726,9 +726,6 @@ static apr_status_t deflate_in_filter(ap_filter_t *f, ap_remove_input_filter(f); return ap_get_brigade(f->next, bb, mode, block, readbytes); } - apr_table_unset(r->headers_in, "Content-Length"); - apr_table_unset(r->headers_in, "Content-MD5"); - apr_table_unset(r->headers_in, "Content-Range"); f->ctx = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx)); ctx->bb = apr_brigade_create(r->pool, f->c->bucket_alloc); @@ -740,6 +737,10 @@ static apr_status_t deflate_in_filter(ap_filter_t *f, return rv; } + apr_table_unset(r->headers_in, "Content-Length"); + apr_table_unset(r->headers_in, "Content-MD5"); + apr_table_unset(r->headers_in, "Content-Range"); + len = 10; rv = apr_brigade_flatten(ctx->bb, deflate_hdr, &len); if (rv != APR_SUCCESS) {