]> granicus.if.org Git - apache/commitdiff
Make sure that transient buckets are morphed into real buckets before
authorGraham Leggett <minfrin@apache.org>
Tue, 6 Oct 2015 22:38:28 +0000 (22:38 +0000)
committerGraham Leggett <minfrin@apache.org>
Tue, 6 Oct 2015 22:38:28 +0000 (22:38 +0000)
the filter returns.

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

server/util_filter.c

index 949d13e0a8b7dafc5c26eeb1455e8d4e1a77ff1f..3a18169a52e9814bcfb92a3d5ba2327ede2e5911 100644 (file)
@@ -736,6 +736,16 @@ AP_DECLARE(apr_status_t) ap_filter_setaside_brigade(ap_filter_t *f,
 
         /* decide what pool we setaside to, request pool or deferred pool? */
         if (f->r) {
+            apr_bucket *e;
+            for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e =
+                    APR_BUCKET_NEXT(e)) {
+                if (APR_BUCKET_IS_TRANSIENT(e)) {
+                    int rv = apr_bucket_setaside(e, f->r->pool);
+                    if (rv != APR_SUCCESS) {
+                        return rv;
+                    }
+                }
+            }
             pool = f->r->pool;
             APR_BRIGADE_CONCAT(f->bb, bb);
         }