]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport r602735 and r602735
authorNick Kew <niq@apache.org>
Wed, 12 Dec 2007 20:43:04 +0000 (20:43 +0000)
committerNick Kew <niq@apache.org>
Wed, 12 Dec 2007 20:43:04 +0000 (20:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@603732 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/http/chunk_filter.c
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 07e96909e1513c04c7cba8fc68e61f43345b2720..3d6a5036f351a7ac45480eb2bc4920bcb659d68b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,14 @@ Changes with Apache 2.2.7
      mod_imagemap: Fix a cross-site scripting issue.  Reported by JPCERT.
      [Joe Orton]  
 
+  *) core: Lower memory consumption of ap_r* functions by reusing the brigade
+     instead of recreating it during each filter pass.
+     [Stefan Fritsch <sf sfritsch.de>]
+
+  *) 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>]
+
   *) core: Fix broken chunk filtering that causes all non blocking reads to be
      converted into blocking reads.  PR 19954, 41056.
      [Jean-Frederic Clere, Jim Jagielski]
diff --git a/STATUS b/STATUS
index 9dc73845a546846807c135c101a045ab656f5c5c..0e62073db4cbd0d3022b3d311c50d6e6caafceca 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -85,23 +85,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.2.x version of the patch works
      +1 mturk, fuankg, rpluem
 
-   * core: Lower memory consumption in case that flush buckets are passed thru
-     the chunk filter as last bucket of a brigade.
-     PR: 23567
-     Trunk version of patch:
-        http://svn.apache.org/viewcvs.cgi?rev=602735&view=rev
-     Backport version for 2.2.x of patch:
-        Trunk version of patch works
-     +1: rpluem, jorton, niq
-
-   * core: Lower memory consumption of ap_r* functions by reusing the brigade
-     instead of recreating it during each filter pass.
-     Trunk version of patch:
-        http://svn.apache.org/viewcvs.cgi?rev=603227&view=rev
-     Backport version for 2.2.x of patch:
-        Trunk version of patch works
-     +1: rpluem, jorton, niq
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
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) {
index b10a45b909432912f804e6770eab87cfeb7bcf47..e5b2e030db971a694467c3e722555deee5c2b2bb 100644 (file)
@@ -1399,9 +1399,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(
          * can simply insert our buffered data at the front and
          * pass the whole bundle down the chain.
          */
-        APR_BRIGADE_CONCAT(ctx->bb, bb);
-        bb = ctx->bb;
-        ctx->bb = NULL;
+        APR_BRIGADE_PREPEND(bb, ctx->bb);
     }
 
     return ap_pass_brigade(f->next, bb);