From: Greg Ames Date: Wed, 11 Jun 2003 17:46:25 +0000 (+0000) Subject: core_output_filter: don't split the brigade after a FLUSH bucket if it's the X-Git-Tag: pre_ajp_proxy~1551 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d33f0ca220b74e75cdf0dba35fc6e39095ed4571;p=apache core_output_filter: don't split the brigade after a FLUSH bucket if it's the last bucket. This prevents creating unneccessary empty brigades which may not be destroyed until the end of a keepalive connection. Submitted by: Juan Rivera git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100210 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index a813babd79..606e083144 100644 --- a/server/core.c +++ b/server/core.c @@ -3861,7 +3861,9 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b) break; } if (APR_BUCKET_IS_FLUSH(e)) { - more = apr_brigade_split(b, APR_BUCKET_NEXT(e)); + if (e != APR_BRIGADE_LAST(b)) { + more = apr_brigade_split(b, APR_BUCKET_NEXT(e)); + } break; }