[master] f36b3ca Add a gunzip-esi-gzip testcase
Poul-Henning Kamp
phk at project.varnish-software.com
Sat Jan 22 14:01:55 CET 2011
commit f36b3ca617b3e6ce8dff2906f978bf3376db738b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sat Jan 22 10:49:00 2011 +0000
Add a gunzip-esi-gzip testcase
diff --git a/bin/varnishtest/tests/e00022.vtc b/bin/varnishtest/tests/e00022.vtc
new file mode 100644
index 0000000..5634797
--- /dev/null
+++ b/bin/varnishtest/tests/e00022.vtc
@@ -0,0 +1,41 @@
+# $Id$
+
+test "ESI ability to stitch gzip files together"
+
+
+server s1 {
+ rxreq
+ expect req.http.accept-encoding == gzip
+ txresp -gzipbody {
+ <esi:remove>
+ This is a test: Unseen University
+ <esi:include src="trick question">
+ <!--esi XXX -->
+ </esi:remove>
+ <esX>This is a test: Hello world
+ }
+} -start
+
+varnish v1 -vcl+backend {
+ sub vcl_recv {
+ set req.esi = true;
+ }
+ sub vcl_fetch {
+ set beresp.do_esi = true;
+ }
+} -start
+
+varnish v1 -cliok "param.set esi_syntax 0xc"
+varnish v1 -cliok "param.set http_gzip_support true"
+
+client c1 {
+ txreq -hdr "Accept-Encoding: gzip"
+ rxresp
+ expect resp.http.content-encoding == gzip
+ gunzip
+ expect resp.status == 200
+ expect resp.bodylen == 40
+}
+
+client c1 -run
+varnish v1 -expect esi_errors == 2
More information about the varnish-commit
mailing list