]> granicus.if.org Git - apache/commitdiff
Pass the EOS bucket down the filter chain
authorStefan Fritsch <sf@apache.org>
Sat, 25 Feb 2012 22:51:33 +0000 (22:51 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 25 Feb 2012 22:51:33 +0000 (22:51 +0000)
PR: 52766

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

modules/filters/mod_xml2enc.c

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 */