]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
PR#39854
authorNick Kew <niq@apache.org>
Wed, 21 Jun 2006 23:16:47 +0000 (23:16 +0000)
committerNick Kew <niq@apache.org>
Wed, 21 Jun 2006 23:16:47 +0000 (23:16 +0000)
Remove bogus code that chokes on flush buckets

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@416165 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_deflate.c

index 3e0462321f35d6af2a295997ecc707d0dec0c622..386b4fbf3f9fcf6a29570543f7ea0cd651fd2030 100644 (file)
@@ -929,27 +929,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
         }
 
         if (APR_BUCKET_IS_FLUSH(bkt)) {
-            apr_bucket *tmp_heap;
-            zRC = inflate(&(ctx->stream), Z_SYNC_FLUSH);
-            if (zRC != Z_OK) {
-                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
-                              "Inflate error %d on flush", zRC);
-                inflateEnd(&ctx->stream);
-                return APR_EGENERAL;
-            }
-
-            ctx->stream.next_out = ctx->buffer;
-            len = c->bufferSize - ctx->stream.avail_out;
-
-            ctx->crc = crc32(ctx->crc, (const Bytef *)ctx->buffer, len);
-            tmp_heap = apr_bucket_heap_create((char *)ctx->buffer, len,
-                                             NULL, f->c->bucket_alloc);
-            APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, tmp_heap);
-            ctx->stream.avail_out = c->bufferSize;
-
-            /* Move everything to the returning brigade. */
-            APR_BUCKET_REMOVE(bkt);
-            break;
+            continue;
         }
 
         /* read */
@@ -1088,6 +1068,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
     return rv ;
 }
 
+#define PROTO_FLAGS AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH
 static void register_hooks(apr_pool_t *p)
 {
     ap_register_output_filter(deflateFilterName, deflate_out_filter, NULL,