r2832 - trunk/varnish-cache/bin/varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Thu Jun 26 13:55:39 CEST 2008
Author: phk
Date: 2008-06-26 13:55:39 +0200 (Thu, 26 Jun 2008)
New Revision: 2832
Added:
trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc
Log:
ESI testcase for including from different host (http://...)
Added: trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/e00006.vtc 2008-06-26 11:55:39 UTC (rev 2832)
@@ -0,0 +1,44 @@
+# $Id$
+
+test "ESI include with http://"
+
+
+server s1 {
+ rxreq
+ expect req.url == "/foo/bar"
+ txresp -body {
+ Before include
+ <!--esi <esi:include src="http://bozz/body"> -->
+ After include
+ }
+} -start
+
+
+server s2 -listen 127.0.0.1:9180 {
+ rxreq
+ expect req.url == "/body"
+ txresp -body {
+ Included file
+ }
+} -start
+
+varnish v1 -vcl+backend {
+ sub vcl_recv {
+ if (req.http.host == "bozz") {
+ set req.backend = s2;
+ } else {
+ set req.backend = s1;
+ }
+ }
+ sub vcl_fetch {
+ esi;
+ }
+} -start
+
+client c1 {
+ txreq -url /foo/bar -hdr "Host: froboz"
+ rxresp
+ expect resp.status == 200
+}
+
+client c1 -run
More information about the varnish-commit
mailing list