Mailing List Archive

r2941 - trunk/varnish-cache/bin/varnishtest/tests
Author: phk
Date: 2008-07-12 00:07:10 +0200 (Sat, 12 Jul 2008)
New Revision: 2941

Added:
trunk/varnish-cache/bin/varnishtest/tests/c00016.vtc
Log:
Test that "Connection:" header deletes http headers in both directions.



Added: trunk/varnish-cache/bin/varnishtest/tests/c00016.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00016.vtc (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00016.vtc 2008-07-11 22:07:10 UTC (rev 2941)
@@ -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