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


_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to