[master] e5e43bd Make sure to initialize the the {do|is}_gzip variables to zero before we start setting them otherwise.

Poul-Henning Kamp phk at varnish-cache.org
Wed Feb 23 16:04:55 CET 2011


commit e5e43bd262b1b5db35d56a798ac1ce1d8c6b8b50
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 23 15:04:24 2011 +0000

    Make sure to initialize the the {do|is}_gzip  variables to zero
    before we start setting them otherwise.

diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index 30c9f32..ac370be 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -1153,6 +1153,11 @@ cnt_recv(struct sess *sp)
 		return (0);
 	}
 
+	sp->wrk->is_gzip = 0;
+	sp->wrk->is_gunzip = 0;
+	sp->wrk->do_gzip = 0;
+	sp->wrk->do_gunzip = 0;
+
 	if (params->http_gzip_support &&
 	     (recv_handling != VCL_RET_PIPE) &&
 	     (recv_handling != VCL_RET_PASS)) {
diff --git a/bin/varnishtest/tests/r00861.vtc b/bin/varnishtest/tests/r00861.vtc
index 38db46b..6842cbd 100644
--- a/bin/varnishtest/tests/r00861.vtc
+++ b/bin/varnishtest/tests/r00861.vtc
@@ -36,6 +36,8 @@ varnish v1 \
 client c1 {
 	txreq -url "/1"
 	rxresp
+	expect resp.http.Content-Encoding == resp.http.Content-Encoding
+	expect resp.bodylen == 22
 
 	txreq -url "/barf" -hdr "Accept-Encoding: gzip"
 	rxresp



More information about the varnish-commit mailing list