]> granicus.if.org Git - apache/commitdiff
core_output_filter: don't split the brigade after a FLUSH bucket if it's the
authorGreg Ames <gregames@apache.org>
Wed, 11 Jun 2003 17:46:25 +0000 (17:46 +0000)
committerGreg Ames <gregames@apache.org>
Wed, 11 Jun 2003 17:46:25 +0000 (17:46 +0000)
last bucket.  This prevents creating unneccessary empty brigades which may
not be destroyed until the end of a keepalive connection.

Submitted by: Juan Rivera <Juan.Rivera@NO_SPAM.citrix.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100210 13f79535-47bb-0310-9956-ffa450edef68

server/core.c

index a813babd797fefc3220d1507ef3e1c060144d2b8..606e083144948c68c94eed5900e8110fe1984202 100644 (file)
@@ -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;
             }