[4.1] 723f8a5 Propagate gzip CRC upwards from nested ESI includes.

Poul-Henning Kamp phk at FreeBSD.org
Thu Sep 10 14:37:28 CEST 2015


commit 723f8a5219e622c10302a70c0596b34d1116418b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 9 19:27:08 2015 +0000

    Propagate gzip CRC upwards from nested ESI includes.
    
    Detected by:	Laurent Lavaud
    Patched by:	martin (with minor shuffle by me)
    
    Fixes:		#1781

diff --git a/bin/varnishtest/tests/r01781.vtc b/bin/varnishtest/tests/r01781.vtc
new file mode 100644
index 0000000..5b796d8
--- /dev/null
+++ b/bin/varnishtest/tests/r01781.vtc
@@ -0,0 +1,27 @@
+varnishtest "#1781 gzip checksum with multilevel esi"
+
+server s1 {
+	rxreq
+	txresp -body {<esi:include src="/1"/>Baz}
+
+	rxreq
+	txresp -body {<esi:include src="/2"/>Bar}
+
+	rxreq
+	txresp -body {Foo}
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_backend_response {
+		set beresp.do_gzip = true;
+		set beresp.do_esi = true;
+	}
+} -start
+
+client c1 {
+	txreq -hdr "Accept-Encoding: gzip"
+	rxresp
+	expect resp.http.content-encoding == "gzip"
+	gunzip
+	expect resp.body == "FooBarBaz"
+} -run



More information about the varnish-commit mailing list