From 0cc2ec6e6879189bebf6aeac7f814bfd01d28714 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 26 Jun 2008 11:55:39 +0000 Subject: [PATCH] ESI testcase for including from different host (http://...) git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2832 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- .../bin/varnishtest/tests/e00006.vtc | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 varnish-cache/bin/varnishtest/tests/e00006.vtc diff --git a/varnish-cache/bin/varnishtest/tests/e00006.vtc b/varnish-cache/bin/varnishtest/tests/e00006.vtc new file mode 100644 index 00000000..238bac5e --- /dev/null +++ b/varnish-cache/bin/varnishtest/tests/e00006.vtc @@ -0,0 +1,44 @@ +# $Id$ + +test "ESI include with http://" + + +server s1 { + rxreq + expect req.url == "/foo/bar" + txresp -body { + Before include + + 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 -- 2.39.5