[master] b950644 Add an assert that we get the vary attribute

Martin Blix Grydeland martin at varnish-software.com
Mon May 8 14:56:06 CEST 2017


commit b950644283d4e6bfd7a5663aa756446b2f1ffedd
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Mon May 8 14:41:17 2017 +0200

    Add an assert that we get the vary attribute
    
    If an object has OA_VARY, we should succeed in getting it.
    
    This might help to narrow down #2319

diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 8019591..6dd6e61 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -428,6 +428,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
 
 		if (ObjHasAttr(wrk, oc, OA_VARY)) {
 			vary = ObjGetAttr(wrk, oc, OA_VARY, NULL);
+			AN(vary);
 			if (!VRY_Match(req, vary))
 				continue;
 		}



More information about the varnish-commit mailing list