From: Stefan Fritsch Date: Mon, 29 Aug 2011 07:28:56 +0000 (+0000) Subject: Unset Content-Length if we call ap_pass_brigade several times X-Git-Tag: 2.3.15~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecf3d3cc71f85d1715194d5125afd31b293042bf;p=thirdparty%2Fapache%2Fhttpd.git Unset Content-Length if we call ap_pass_brigade several times git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162665 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index 775d7e72154..f7f4194c66e 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -392,7 +392,13 @@ 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 */ + /* + * 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);