[4.1] ddc8718 Test esi:included uncompressed synthetic responses
Lasse Karstensen
lkarsten at varnish-software.com
Thu Feb 11 17:14:33 CET 2016
commit ddc8718876018a7e0748053e66f0d2d56ba464aa
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