]> granicus.if.org Git - apache/commitdiff
Merge r1572896, r1572911 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 14 Jul 2014 12:09:21 +0000 (12:09 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 14 Jul 2014 12:09:21 +0000 (12:09 +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.

Submitted by: ylavic
Reviewed/backported by: jim

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

CHANGES
STATUS
modules/filters/mod_deflate.c

diff --git a/CHANGES b/CHANGES
index 6697d8eee8857e0a9ce9a43cb1002fb02f17023f..de28fc55afa911e651e6428698f70aa9b7bb3356 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.4.10
 
+  *) 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_proxy_ajp: Forward local IP address as a custom request attribute
      like we already do for the remote port. [Rainer Jung]
 
diff --git a/STATUS b/STATUS
index 24b445043656d03b59d096d974687a0b9d72e780..cde7685bf55373bb4b7532413fb32b44808e3594 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -100,18 +100,6 @@ RELEASE SHOWSTOPPERS:
 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
-     Submitted by: [Christoph Fausak <christoph fausak glueckkanja com>]
-     Committed by: ylavic
-     2.4.x patch: http://people.apache.org/~ylavic/httpd-2.4.x-mod_deflate-flush_end_of_stream.patch
-                  (modulo CHANGES, added lately from r1603156)
-     +1: ylavic, covener, trawick
-     ylavic: does not depend on r1572092 or r1572655 and al above,
-             these proposals can be backported in any order.
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
index a35cb81fc12f3b9d817b47f2168abd8d96f4a8c9..8ba21d36ff9cf1b8e43be390924aaf2701386f06 100644 (file)
@@ -1527,7 +1527,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) {
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01402)
                               "Zlib error %d flushing inflate buffer (%s)",
                               zRC, ctx->stream.msg);