[master] 6764fbb Add a new test-case.
Poul-Henning Kamp
phk at FreeBSD.org
Thu May 14 19:16:02 CEST 2015
commit 6764fbb560ae3339c7b50679fc48b121a78b8d04
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu May 14 17:15:40 2015 +0000
Add a new test-case.
diff --git a/bin/varnishtest/tests/e00029.vtc b/bin/varnishtest/tests/e00029.vtc
new file mode 100644
index 0000000..5be8aa3
--- /dev/null
+++ b/bin/varnishtest/tests/e00029.vtc
@@ -0,0 +1,26 @@
+varnishtest "fun esi includes and ranges"
+
+server s1 {
+ rxreq
+ txresp -body {<html><esi:include src="/bar"/></html>}
+ rxreq
+ expect req.url == /bar
+ txresp -body "ABCD"
+} -start
+
+varnish v1 -vcl+backend {
+ sub vcl_recv {
+ if (req.url == "/bar") {
+ set req.http.Range = "bytes=1-2";
+ }
+ }
+ sub vcl_backend_response {
+ set beresp.do_esi = true;
+ }
+} -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.body == "<html>BC</html>"
+} -run
diff --git a/bin/varnishtest/tests/g00002.vtc b/bin/varnishtest/tests/g00002.vtc
index 1418212..712d51b 100644
--- a/bin/varnishtest/tests/g00002.vtc
+++ b/bin/varnishtest/tests/g00002.vtc
@@ -42,6 +42,7 @@ client c1 {
rxresp
expect resp.http.content-encoding == <undef>
expect resp.bodylen == 4100
+ delay .1
# See varnish can gunzip it, inside ESI
txreq -url /bar -hdr "Accept-Encoding: null"
More information about the varnish-commit
mailing list