From: Andre Malo Date: Tue, 18 Feb 2003 00:23:20 +0000 (+0000) Subject: While processing filters on internal redirects, remember seen EOS X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86575d5c468c7de799c36356e3cbccaffbc2b339;p=apache While processing filters on internal redirects, remember seen EOS buckets also in the request structure of the redirect issuer(s). This prevents filters (such as mod_deflate) to add garbage to the response, because ap_finalize_request_protocol won't send another EOS bucket then. PR: 14451 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98699 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 99ea482296..4149304a30 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,11 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) While processing filters on internal redirects, remember seen EOS + buckets also in the request structure of the redirect issuer(s). This + prevents filters (such as mod_deflate) to add garbage to the response. + PR 14451. [André Malo] + *) Allow restart of httpd to occur even with syntax errors in the config file. PR 16813. [Justin Erenkrantz] @@ -20,8 +25,8 @@ Changes with Apache 2.1.0-dev *) Allow apachectl to perform status with links and elinks as well. [Justin Erenkrantz] - *) Fix segfault which occurred when a section in an included file was - not closed. PR 17093. [André Malo] + *) Fix segfault which occurred when a section in an included configuration + file was not closed. PR 17093. [André Malo] *) Extend the SetEnvIf directive to capture subexpressions of the matched value. [André Malo] diff --git a/server/util_filter.c b/server/util_filter.c index 9ba2921c80..308e24ae21 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -536,6 +536,16 @@ AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *next, * get two EOS buckets on the same request. */ next->r->eos_sent = 1; + + /* remember the eos for internal redirects, too */ + if (next->r->prev) { + request_rec *prev = next->r->prev; + + while (prev) { + prev->eos_sent = 1; + prev = prev->prev; + } + } } return next->frec->filter_func.out_func(next, bb); }