From: Stefan Fritsch Date: Sun, 28 Aug 2011 19:45:21 +0000 (+0000) Subject: Every 32 ranges, pass the prepared ranges down the filter chain. X-Git-Tag: 2.3.15~323 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccd0312ce5a2469b5ba580fb1287c4b1c285c909;p=thirdparty%2Fapache%2Fhttpd.git Every 32 ranges, pass the prepared ranges down the filter chain. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162579 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index a1a5b9408ca..c49e35c07f9 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -378,6 +378,12 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f, } 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); + } } if (found == 0) {