Commit 5b67c627 authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

Oops.

When deflating: only reset ctx->stream buffers when the ctx was NULL.
When inflating: remember to clear the ctx->bb after we're done with it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95521 13f79535-47bb-0310-9956-ffa450edef68
parent aa69c87e
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -365,11 +365,11 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
        }
        apr_table_setn(r->headers_out, "Vary", "Accept-Encoding");
        apr_table_unset(r->headers_out, "Content-Length");
    }

        /* initialize deflate output buffer */
        ctx->stream.next_out = ctx->buffer;
        ctx->stream.avail_out = c->bufferSize;
    }
    
    APR_BRIGADE_FOREACH(e, bb) {
        const char *data;
@@ -713,13 +713,13 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
                }

                inflateEnd(&ctx->stream);
                apr_brigade_cleanup(ctx->bb);
    
                eos = apr_bucket_eos_create(f->c->bucket_alloc);
                APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, eos); 
                break;
            }
        }
        apr_brigade_cleanup(ctx->bb);
    }

    if (!APR_BRIGADE_EMPTY(ctx->proc_bb)) {
@@ -733,8 +733,6 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
        APR_BRIGADE_CONCAT(ctx->proc_bb, newbb);
    }

    

    return APR_SUCCESS;
}