]> granicus.if.org Git - apache/commitdiff
* Do not split the brigade if the flush bucket is the last bucket in the brigade.
authorRuediger Pluem <rpluem@apache.org>
Sun, 9 Dec 2007 22:03:10 +0000 (22:03 +0000)
committerRuediger Pluem <rpluem@apache.org>
Sun, 9 Dec 2007 22:03:10 +0000 (22:03 +0000)
PR: 23567
Submitted by: Stefan Fritsch <sf sfritsch.de>
Reviewed by: rpluem

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

CHANGES
modules/http/chunk_filter.c

diff --git a/CHANGES b/CHANGES
index 1b08894473a3484fa37e028eb57cdc1622c24f7a..d54bf10e2393d4d2573d576461d1ee3305b13e86 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) core: Lower memory consumption in case that flush buckets are passed thru
+     the chunk filter as last bucket of a brigade. PR 23567.
+     [Stefan Fritsch <sf sfritsch.de>]
+
   *) mod_proxy: Keep connections to the backend persistent in the HTTPS case.
      [Ruediger Pluem]
 
index 2c94b3cae5043c5ddfbcb5aedde299eaddb63713..b680185b80125caac67d5a8f63553c93fd3c910c 100644 (file)
@@ -85,7 +85,9 @@ apr_status_t ap_http_chunk_filter(ap_filter_t *f, apr_bucket_brigade *b)
             }
             if (APR_BUCKET_IS_FLUSH(e)) {
                 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;
             }
             else if (e->length == (apr_size_t)-1) {