You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2014/04/15 16:29:30 UTC
svn commit: r1587594 - /httpd/httpd/trunk/modules/filters/mod_deflate.c
Author: ylavic
Date: Tue Apr 15 14:29:30 2014
New Revision: 1587594
URL: http://svn.apache.org/r1587594
Log:
mod_deflate: Delay INFLATE input filter's self removal until all the buffered
buckets are out (including EOS). PR 46146.
Modified:
httpd/httpd/trunk/modules/filters/mod_deflate.c
Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=1587594&r1=1587593&r2=1587594&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_deflate.c Tue Apr 15 14:29:30 2014
@@ -1194,7 +1194,6 @@ static apr_status_t deflate_in_filter(ap
/* Move everything to the returning brigade. */
APR_BUCKET_REMOVE(bkt);
APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, bkt);
- ap_remove_input_filter(f);
break;
}
@@ -1368,8 +1367,8 @@ static apr_status_t deflate_in_filter(ap
* some data in our zlib buffer, flush it out so we can return something.
*/
if (block == APR_BLOCK_READ &&
- APR_BRIGADE_EMPTY(ctx->proc_bb) &&
- ctx->stream.avail_out < c->bufferSize) {
+ APR_BRIGADE_EMPTY(ctx->proc_bb) &&
+ ctx->stream.avail_out < c->bufferSize) {
apr_bucket *tmp_heap;
apr_size_t len;
ctx->stream.next_out = ctx->buffer;
@@ -1390,6 +1389,9 @@ static apr_status_t deflate_in_filter(ap
APR_BRIGADE_CONCAT(bb, ctx->proc_bb);
apr_brigade_split_ex(bb, bkt, ctx->proc_bb);
}
+ if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
+ ap_remove_input_filter(f);
+ }
}
return APR_SUCCESS;