[master] 55dfe08 Test esi:included uncompressed synthetic responses

Federico G. Schwindt fgsch at lodoss.net
Mon Feb 8 14:35:32 CET 2016


commit 55dfe089607c1743593a9776bc9fafc0f45d5ed3
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Mon Feb 8 09:47:53 2016 +0000

    Test esi:included uncompressed synthetic responses

diff --git a/bin/varnishtest/tests/r01838.vtc b/bin/varnishtest/tests/r01838.vtc
new file mode 100644
index 0000000..ce1f20b
--- /dev/null
+++ b/bin/varnishtest/tests/r01838.vtc
@@ -0,0 +1,32 @@
+varnishtest "Uncompressed synthetic responses as esi includes"
+
+server s1 {
+	rxreq
+	txresp -body {<FOO><esi:include src="/foo"/></FOO>}
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_recv {
+		if (req.url == "/foo") {
+			return (synth(998));
+		}
+	}
+
+	sub vcl_synth {
+		if (resp.status == 998) {
+			synthetic("synthetic body");
+			return (deliver);
+		}
+	}
+
+	sub vcl_backend_response {
+		set beresp.do_esi = true;
+	}
+} -start
+
+client c1 {
+	txreq
+	rxresp
+	expect resp.status == 200
+	expect resp.body == "<FOO>synthetic body</FOO>"
+} -run



More information about the varnish-commit mailing list