]> granicus.if.org Git - apache/commitdiff
Merge r1293717 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 8 Mar 2012 16:09:43 +0000 (16:09 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 8 Mar 2012 16:09:43 +0000 (16:09 +0000)
Pass the EOS bucket down the filter chain

PR: 52766

Submitted by: sf
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1298451 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/filters/mod_xml2enc.c

diff --git a/CHANGES b/CHANGES
index da5002a7b85ceaa296c67dd6ab90dd84978dd1f0..bea7ade6b199a39728df66352daed47e158c0092 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.2
 
+  *) mod_xml2enc: Fix broken handling of EOS buckets which could lead to
+     response headers not being sent. PR 52766. [Stefan Fritsch]
+
   *) mod_ssl: Properly free the GENERAL_NAMEs. PR 32652.
 
   *) core: Check during config test that directories for the access
diff --git a/STATUS b/STATUS
index 56317e3846cc7c889900b242dec0fc36fc62e49b..440ec414060dc0a5896dba64b88dbecb9f248ae6 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -89,13 +89,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-* mod_xml2enc: Fix handling of EOS buckets.
-   Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1293717
-   2.4.x patch: Trunk patch works, needs CHANGES entry:
-     mod_xml2enc: Fix broken handling of EOS buckets which could lead to
-     response headers not being sent. PR 52766. [Stefan Fritsch]
-   +1: sf, covener, jim
-
  * envvars: Fix handling of LD_LIBRARY_PATH. CVE-2012-0883
    Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1296428
    2.4.x patch: Trunk patch works
index 5b082fb43111d94bb8e3045e32fc7fcaeed7802f..f82f8bf50b45179f8e80a646ff191e8f9a15ddc0 100644 (file)
@@ -392,13 +392,14 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
     while (b = APR_BRIGADE_FIRST(bb), b != APR_BRIGADE_SENTINEL(bb)) {
         ctx->bytes = 0;
         if (APR_BUCKET_IS_METADATA(b)) {
+            APR_BUCKET_REMOVE(b);
             if (APR_BUCKET_IS_EOS(b)) {
                 /* send remaining data */
+                APR_BRIGADE_INSERT_TAIL(ctx->bbnext, b);
                 return ap_fflush(f->next, ctx->bbnext);
             } else if (APR_BUCKET_IS_FLUSH(b)) {
                 ap_fflush(f->next, ctx->bbnext);
             }
-            APR_BUCKET_REMOVE(b);
             apr_bucket_destroy(b);
         }
         else {        /* data bucket */