From 587550f62326a72021a62844f2776083585483a7 Mon Sep 17 00:00:00 2001 From: Greg Ames Date: Fri, 13 Jul 2007 15:11:16 +0000 Subject: [PATCH] * generalize from error buckets to metadata buckets * also applicable to the deflate input filter * pass along metadata buckets rather than giving up mid-stream MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index d92144ea00..61c3d08170 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -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); -- 2.40.0