From: Yann Ylavic Date: Tue, 15 Apr 2014 17:21:45 +0000 (+0000) Subject: mod_deflate: Don't return gzip-ed data when reading FLUSH bucket in INFLATE X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7dd4b3df7f6d8c0b7b1bab150637fec39687545;p=thirdparty%2Fapache%2Fhttpd.git mod_deflate: Don't return gzip-ed data when reading FLUSH bucket in INFLATE input filter, forward the FLUSH but keep reading should EOS/more follow (should not happen, but mod_deflate won't fix it). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587639 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 2d9a5f14747..3944c0d3ca4 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -1217,10 +1217,12 @@ static apr_status_t deflate_in_filter(ap_filter_t *f, APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, tmp_heap); ctx->stream.avail_out = c->bufferSize; - /* Move everything to the returning brigade. */ + /* Flush everything so far in the returning brigade, but continue + * reading should EOS/more follow (don't lose them). + */ APR_BUCKET_REMOVE(bkt); - APR_BRIGADE_CONCAT(bb, ctx->bb); - break; + APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, bkt); + continue; } /* sanity check - data after completed compressed body and before eos? */