[master] 66e7a25 Add a testcase for including a non-gzip'ed ESI object in a gzip'ed ESI object.

Poul-Henning Kamp phk at project.varnish-software.com
Sat Jan 22 14:55:39 CET 2011


commit 66e7a250a79e9b26aa64df05dd039401298f216f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat Jan 22 13:42:26 2011 +0000

    Add a testcase for including a non-gzip'ed ESI object in a gzip'ed
    ESI object.

diff --git a/bin/varnishtest/tests/e00023.vtc b/bin/varnishtest/tests/e00023.vtc
new file mode 100644
index 0000000..c493fa6
--- /dev/null
+++ b/bin/varnishtest/tests/e00023.vtc
@@ -0,0 +1,40 @@
+# $Id$
+
+test "Include an ungzip'ed ESI object in a gzip'ed ESI object"
+
+server s1 {
+	rxreq 
+	expect req.http.accept-encoding == gzip
+	txresp -gzipbody {
+		<html>					1
+		Before include				2
+		<esi:include src="/foo"/>		3
+		After include				4
+	}
+	rxreq
+	expect req.url == "/foo"
+	txresp -body {<h1>/////<h2>}
+} -start
+
+varnish v1 -vcl+backend {
+	sub vcl_fetch {
+		set beresp.do_esi = true;
+	}
+} -start 
+
+varnish v1 -cliok "param.set http_gzip_support true"
+varnish v1 -cliok "param.set esi_syntax 0x3e" 
+
+varnish v1 -cliok "param.set diag_bitmap 0x10000"
+
+client c1 {
+	txreq -hdr "Accept-Encoding: gzip"
+	rxresp
+	expect resp.http.content-encoding == gzip
+	gunzip
+	expect resp.status == 200
+	expect resp.bodylen == 79
+}
+
+client c1 -run
+varnish v1 -expect esi_errors == 0



More information about the varnish-commit mailing list