]> granicus.if.org Git - apache/commitdiff
* generalize from error buckets to metadata buckets
authorGreg Ames <gregames@apache.org>
Fri, 13 Jul 2007 15:11:16 +0000 (15:11 +0000)
committerGreg Ames <gregames@apache.org>
Fri, 13 Jul 2007 15:11:16 +0000 (15:11 +0000)
* also applicable to the deflate input filter
* pass along metadata buckets rather than giving up mid-stream

vastly improved by: Rüdiger Plüm

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

modules/filters/mod_deflate.c

index d92144ea001ef5e4da900db4a8d65a94795163ef..61c3d081702f4137803568cfea22d2377077d258 100644 (file)
@@ -579,9 +579,14 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
             continue;
         }
 
-        if (AP_BUCKET_IS_ERROR(e)) {
-            ap_remove_output_filter(f);
-            return ap_pass_brigade(f->next, bb);
+        if (APR_BUCKET_IS_METADATA(e)) {
+            /*
+             * Remove meta data bucket from old brigade and insert into the
+             * new.
+             */
+            APR_BUCKET_REMOVE(e);
+            APR_BRIGADE_INSERT_TAIL(ctx->bb, e);
+            continue;
         }
 
         /* read */
@@ -1087,6 +1092,16 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
             continue;
         }
 
+        if (APR_BUCKET_IS_METADATA(e)) {
+            /*
+             * Remove meta data bucket from old brigade and insert into the
+             * new.
+             */
+            APR_BUCKET_REMOVE(e);
+            APR_BRIGADE_INSERT_TAIL(ctx->bb, e);
+            continue;
+        }
+
         /* read */
         apr_bucket_read(e, &data, &len, APR_BLOCK_READ);