]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport r580598: fix inflate_out filter initialisation in mod_deflate.
authorNick Kew <niq@apache.org>
Mon, 1 Oct 2007 10:40:00 +0000 (10:40 +0000)
committerNick Kew <niq@apache.org>
Mon, 1 Oct 2007 10:40:00 +0000 (10:40 +0000)
PR 43512

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

CHANGES
STATUS
modules/filters/mod_deflate.c

diff --git a/CHANGES b/CHANGES
index 91ea40d7a0051a5b4cc0b41de433aff101dadcc1..977323235e2ea8e288f73106d3a4bb8e17ff2f3b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.7
 
+  *) mod_deflate: initialise inflate-out filter correctly when the
+     first brigade contains no data buckets.
+     PR 43512 [Nick Kew]
+
   *) mod_proxy_ajp: Ignore any ajp13 flush packets received before
      we send the response headers. See Tomcat PR 43478.
      [Jim Jagielski]
diff --git a/STATUS b/STATUS
index 72e81bc72e372038ada049b38a823126594f0fe8..8ca3b45354ba073c84f4c5bbcfc9b9b22cfdce9e 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -79,12 +79,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_deflate: initialise inflate-out filter correctly when the
-     first brigade contains no data buckets.
-     PR 43512
-     http://svn.apache.org/viewvc?view=rev&revision=580598
-     +1: niq, wrowe, rpluem
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index f82b75b7c009688ba1d54faedbe40e281c12ae13..07ca194f97d234af5c3f6fed3252bd374ef35692 100644 (file)
@@ -293,6 +293,7 @@ typedef struct deflate_ctx_t
     int (*libz_end_func)(z_streamp);
     unsigned char *validation_buffer;
     apr_size_t validation_buffer_length;
+    int inflate_init;
 } deflate_ctx;
 
 /* Number of validation bytes (CRC and length) after the compressed data */
@@ -983,7 +984,6 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
 {
     int zlib_method;
     int zlib_flags;
-    int inflate_init = 1;
     apr_bucket *e;
     request_rec *r = f->r;
     deflate_ctx *ctx = f->ctx;
@@ -1067,7 +1067,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
         ctx->stream.next_out = ctx->buffer;
         ctx->stream.avail_out = c->bufferSize;
 
-        inflate_init = 0;
+        ctx->inflate_init = 0;
     }
 
     while (!APR_BRIGADE_EMPTY(bb))
@@ -1172,7 +1172,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
         apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
 
         /* first bucket contains zlib header */
-        if (!inflate_init++) {
+        if (!ctx->inflate_init++) {
             if (len < 10) {
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                               "Insufficient data for inflate");