On Sun, 28 Aug 2011, s...@apache.org wrote:
Author: sf
Date: Sun Aug 28 19:45:21 2011
New Revision: 1162579
URL: http://svn.apache.org/viewvc?rev=1162579&view=rev
Log:
Every 32 ranges, pass the prepared ranges down the filter chain.
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=1162579&r1=1162578&r2=1162579&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Sun Aug 28 19:45:21 2011
@@ -378,6 +378,12 @@ 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 */
+ if ((rv = ap_pass_brigade(f->next, bsend)) != APR_SUCCESS)
+ return rv;
+ apr_brigade_cleanup(bsend);
+ }
}
This is broken. It causes the Content-Length header to contain the size of
the original file instead of the response body. Is the correct fix to add
apr_table_unset(r->headers_out, "Content-Length") ?