[master] 5bb52ba Test that vcl-set headers do not get filtered via Connection

Nils Goroll nils.goroll at uplex.de
Tue Dec 19 16:15:10 UTC 2017


commit 5bb52ba247286202c339d367f322d572acc62292
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Dec 19 17:11:35 2017 +0100

    Test that vcl-set headers do not get filtered via Connection

diff --git a/bin/varnishtest/tests/c00016.vtc b/bin/varnishtest/tests/c00016.vtc
index 0d285d9..bfe33d4 100644
--- a/bin/varnishtest/tests/c00016.vtc
+++ b/bin/varnishtest/tests/c00016.vtc
@@ -4,22 +4,28 @@ server s1 {
 	rxreq
 	expect req.url == "/foo"
 	expect req.http.Foo == "bar"
+	expect req.http.FromVCL == "123"
 	txresp -hdr "Bar: foo" -body "foobar"
 
 	rxreq
 	expect req.url == "/bar"
 	expect req.http.Foo == <undef>
+	expect req.http.FromVCL == "123"
 	txresp -hdr "Bar: fnry,glyf, FOO ,brok" -hdr "Connection: bar" -body "foobar"
 } -start
 
-varnish v1 -vcl+backend { } -start
+varnish v1 -vcl+backend {
+	sub vcl_recv {
+		set req.http.FromVCL = "123";
+	}
+} -start
 
 client c1 {
 	txreq -url "/foo" -hdr "Foo: bar"
 	rxresp
 	expect resp.http.Bar == "foo"
 
-	txreq -url "/bar" -hdr "Foo: bar2" -hdr "Connection: foo, close"
+	txreq -url "/bar" -hdr "Foo: bar2" -hdr "Connection: FromVCL, foo, close"
 	rxresp
 	expect req.http.Bar == <undef>
 } -run


More information about the varnish-commit mailing list