You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/08/29 09:28:56 UTC
svn commit: r1162665 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Author: sf
Date: Mon Aug 29 07:28:56 2011
New Revision: 1162665
URL: http://svn.apache.org/viewvc?rev=1162665&view=rev
Log:
Unset Content-Length if we call ap_pass_brigade several times
Modified:
httpd/httpd/trunk/modules/http/byterange_filter.c
Modified: httpd/httpd/trunk/modules/http/byterange_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/byterange_filter.c?rev=1162665&r1=1162664&r2=1162665&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Mon Aug 29 07:28:56 2011
@@ -392,7 +392,13 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
APR_BRIGADE_CONCAT(bsend, tmpbb);
if (i && i % 32 == 0) {
- /* Every now and then, pass what we have down the filter chain */
+ /*
+ * Every now and then, pass what we have down the filter chain.
+ * In this case, the content-length filter cannot calculate and
+ * set the content length and we must remove any Content-Length
+ * header already present.
+ */
+ apr_table_unset(r->headers_out, "Content-Length");
if ((rv = ap_pass_brigade(f->next, bsend)) != APR_SUCCESS)
return rv;
apr_brigade_cleanup(bsend);