[PATCH 7/8] Remove dodgy workaround introduced for #763.

Martin Blix Grydeland martin at varnish-software.com
Mon Mar 18 17:57:28 CET 2013


With fix for #1275 we can now do a proper 503 when malformed
Vary-headers are received from backend. Error out instead of accepting
bogus ':'.
---
 bin/varnishd/cache/cache_vary.c  |    5 -----
 bin/varnishtest/tests/r00763.vtc |    2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/bin/varnishd/cache/cache_vary.c b/bin/varnishd/cache/cache_vary.c
index 30d77ed..f66044a 100644
--- a/bin/varnishd/cache/cache_vary.c
+++ b/bin/varnishd/cache/cache_vary.c
@@ -93,11 +93,6 @@ VRY_Create(struct req *req, const struct http *hp, struct vsb **psb)
 	sbh = VSB_new_auto();
 	AN(sbh);
 
-	if (*v == ':') {
-		VSLb(req->vsl, SLT_Error,
-		    "Vary header had extra ':', fix backend");
-		v++;
-	}
 	for (p = v; *p; p++) {
 
 		/* Find next header-name */
diff --git a/bin/varnishtest/tests/r00763.vtc b/bin/varnishtest/tests/r00763.vtc
index 24a4d6f..72fced4 100644
--- a/bin/varnishtest/tests/r00763.vtc
+++ b/bin/varnishtest/tests/r00763.vtc
@@ -10,5 +10,5 @@ varnish v1 -vcl+backend {} -start
 client c1 {
 	txreq
 	rxresp
-	expect resp.http.vary == ": foo"
+	expect resp.status == 503
 } -run
-- 
1.7.10.4




More information about the varnish-dev mailing list