]> err.no Git - varnish/commitdiff
Add a regression test for ticket 292
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 19 Aug 2008 19:33:39 +0000 (19:33 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 19 Aug 2008 19:33:39 +0000 (19:33 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3109 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

diff --git a/varnish-cache/bin/varnishtest/tests/r00292.vtc b/varnish-cache/bin/varnishtest/tests/r00292.vtc
new file mode 100644 (file)
index 0000000..1df83d0
--- /dev/null
@@ -0,0 +1,39 @@
+# $Id$
+#
+# This test checks that the ->hdf flag which tracks Connection: header
+# deletes tracks the headers properly.
+
+test "Header deletion test"
+
+server s1 {
+       rxreq
+       expect req.url == "/foo"
+       expect req.http.hdr1 == "req.http.hdr1"
+       expect req.http.hdr2 == "2"
+       expect req.http.hdr3 == "req.http.hdr3"
+       expect req.http.hdr4 == "4"
+       expect req.http.hdr5 == "req.http.hdr5"
+       expect req.http.hdr6 == "6"
+       txresp -body "foobar"
+} -start
+
+varnish v1 -vcl+backend { 
+
+       sub vcl_recv {
+               remove req.http.hdr1;
+               remove req.http.hdr5;
+       }
+} -start
+
+client c1 {
+       txreq  -url "/foo" \
+               -hdr "Connection: hdr3" \
+               -hdr "hdr1: 1" \
+               -hdr "hdr2: 2" \
+               -hdr "hdr3: 3" \
+               -hdr "hdr4: 4" \
+               -hdr "hdr5: 5" \
+               -hdr "hdr6: 6"
+       rxresp
+} -run
+