]> err.no Git - varnish/commitdiff
Test that "Connection:" header deletes http headers in both directions.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 11 Jul 2008 22:07:10 +0000 (22:07 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 11 Jul 2008 22:07:10 +0000 (22:07 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2941 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/c00016.vtc [new file with mode: 0644]

diff --git a/varnish-cache/bin/varnishtest/tests/c00016.vtc b/varnish-cache/bin/varnishtest/tests/c00016.vtc
new file mode 100644 (file)
index 0000000..a583e15
--- /dev/null
@@ -0,0 +1,27 @@
+# $Id: c00015.vtc 2906 2008-07-08 10:29:07Z phk $
+
+test "Test Connection header handling"
+
+server s1 {
+       rxreq
+       expect req.url == "/foo"
+       expect req.http.Foo == "bar"
+       txresp -hdr "Bar: foo" -body "foobar" 
+
+       rxreq
+       expect req.url == "/bar"
+       expect req.http.Foo == "req.http.Foo"
+       txresp -hdr "Bar: foo" -hdr "Connection: bar" -body "foobar" 
+} -start
+
+varnish v1 -vcl+backend { } -start
+
+client c1 {
+       txreq -url "/foo" -hdr "Foo: bar"
+       rxresp
+       expect resp.http.Bar == "foo"
+
+       txreq -url "/bar" -hdr "Foo: bar2" -hdr "Connection: Foo"
+       rxresp
+       expect req.http.Bar == "req.http.Bar"
+} -start