You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2007/08/06 15:53:35 UTC

svn commit: r563133 - /httpd/httpd/trunk/modules/filters/mod_deflate.c

Author: niq
Date: Mon Aug  6 06:53:35 2007
New Revision: 563133

URL: http://svn.apache.org/viewvc?view=rev&rev=563133
Log:
mod_deflate - discussion on dev@
Postpone unsetting of headers until after first get_brigade from upstream

Modified:
    httpd/httpd/trunk/modules/filters/mod_deflate.c

Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?view=diff&rev=563133&r1=563132&r2=563133
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_deflate.c Mon Aug  6 06:53:35 2007
@@ -726,9 +726,6 @@
             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);
@@ -739,6 +736,10 @@
         if (rv != APR_SUCCESS) {
             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);