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);