]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1572896, r1572911, r1603156 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 17 Jul 2014 18:21:59 +0000 (18:21 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 17 Jul 2014 18:21:59 +0000 (18:21 +0000)
mod_deflate:
Don't fail when asked to flush inflated data to the user-agent and that
coincides with the end of stream ("Zlib error flushing inflate buffer").
PR 56196.

Submitted By: [Christoph Fausak <christoph.fausak glueckkanja com>]
Committed By: ylavic

mod_deflate: follows up r1572896.
Be safe from successive or post end-of-stream flush buckets.

Add missing CHANGES entries for r1572655,1572663,1572668-1572671,1573224,1586745,1587594,1587639,1590509, r1572092, and r1572896,1572911.
Submitted by: ylavic
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1611428 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/filters/mod_deflate.c

diff --git a/CHANGES b/CHANGES
index c480c9cd4ca3e6bed41ad4c0022cbbf35fc39a33..86a1867ff40b0311482c193f5c75d196eefabd23 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -30,6 +30,10 @@ Changes with Apache 2.2.28
   *) mod_proxy_ajp: Forward local IP address as a custom request attribute
      like we already do for the remote port. [Rainer Jung]
 
+  *) mod_deflate: Don't fail when flushing inflated data to the user-agent
+     and that coincides with the end of stream ("Zlib error flushing inflate
+     buffer"). PR 56196. [Christoph Fausak <christoph fausak glueckkanja.com>]
+
   *) mod_cache, mod_disk_cache: With CacheLock enabled, responses with a Vary 
      header might not get the benefit of the thundering herd protection due to 
      an incorrect internal cache key.  PR 50317. 
diff --git a/STATUS b/STATUS
index 6ab876f8826bf82f41e16cb1cd1aa7bbd887aa6f..bd065e127b78c8faf2fa17c15c261ccf1c3f2654 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -100,18 +100,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
 
-   * mod_deflate: Don't fail when asked to flush inflated data to the user-agent
-                  and that coincides with the end of stream ("Zlib error flushing
-                  inflate buffer"). PR 56196.
-     trunk patch: http://svn.apache.org/r1572896
-                  http://svn.apache.org/r1572911
-                  http://svn.apache.org/r1603156 (partially, CHANGES update)
-     2.4.x patch: http://svn.apache.org/r1610397 (2.4.10)
-     2.2.x patch: http://people.apache.org/~ylavic/httpd-2.2.x-mod_deflate-flush_end_of_stream.patch
-                  (modulo CHANGES)
-     +1: ylavic, breser, jim
-
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index bd68812bca6557e668c7031fc29860db26b88f04..4f415e00382c875371809d90c492b3b731264ca5 100644 (file)
@@ -1286,7 +1286,13 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
             /* flush the remaining data from the zlib buffers */
             zRC = flush_libz_buffer(ctx, c, f->c->bucket_alloc, inflate,
                                     Z_SYNC_FLUSH, UPDATE_CRC);
-            if (zRC != Z_OK) {
+            if (zRC == Z_STREAM_END) {
+                if (ctx->validation_buffer == NULL) {
+                    ctx->validation_buffer = apr_pcalloc(f->r->pool,
+                                                         VALIDATION_SIZE);
+                }
+            }
+            else if (zRC != Z_OK) {
                 return APR_EGENERAL;
             }