]> granicus.if.org Git - apache/commitdiff
mod_deflate: Don't return gzip-ed data when reading FLUSH bucket in INFLATE
authorYann Ylavic <ylavic@apache.org>
Tue, 15 Apr 2014 17:21:45 +0000 (17:21 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 15 Apr 2014 17:21:45 +0000 (17:21 +0000)
             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

modules/filters/mod_deflate.c

index 2d9a5f147472cbcb98739512180a1bf98242172b..3944c0d3ca437b6b382b2f7e5e3937b6483fcffc 100644 (file)
@@ -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? */