[master] 79e470485 vtc: Actually do ESI in e25

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Jan 17 17:04:08 UTC 2023


commit 79e4704858ebb8225dcf0d097ed32c8a1a9057f6
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Dec 26 10:30:04 2022 +0100

    vtc: Actually do ESI in e25

diff --git a/bin/varnishtest/tests/e00025.vtc b/bin/varnishtest/tests/e00025.vtc
index e208dc813..fa84031da 100644
--- a/bin/varnishtest/tests/e00025.vtc
+++ b/bin/varnishtest/tests/e00025.vtc
@@ -1,12 +1,20 @@
 varnishtest "Test that esi+gzip correctly bypasses Vary: accept-encoding"
 
 server s1 {
+	rxreq
+	expect req.http.accept-encoding == gzip
+	txresp -hdr "Vary: Accept-encoding" -gzipbody {<esi:include src="/inc"/>}
+
 	rxreq
 	expect req.http.accept-encoding == gzip
 	txresp -hdr "Vary: Accept-encoding" -gzipbody {FOO}
 } -start
 
-varnish v1 -vcl+backend { } -start
+varnish v1 -vcl+backend {
+	sub vcl_backend_response {
+		set beresp.do_esi = true;
+	}
+} -start
 
 client c1 {
 	txreq -hdr "Accept-encoding: gzip"
@@ -15,10 +23,12 @@ client c1 {
 	expect resp.status == 200
 	gunzip
 	expect resp.bodylen == 3
+	expect resp.body == FOO
 
 	txreq
 	rxresp
 	expect resp.http.content-encoding == <undef>
 	expect resp.status == 200
 	expect resp.bodylen == 3
+	expect resp.body == FOO
 } -run


More information about the varnish-commit mailing list