[master] 9137f64 Don't bother iterating over zerolength objects
Poul-Henning Kamp
phk at FreeBSD.org
Sat Mar 12 01:29:04 CET 2016
commit 9137f642f5b053b54810d09bd933953046bcb484
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Mar 11 22:25:28 2016 +0000
Don't bother iterating over zerolength objects
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index bbed50d..5f4326f 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -769,6 +769,9 @@ VED_Deliver(struct req *req, struct boc *boc, int wantbody)
if (wantbody == 0)
return;
+ if (boc == NULL && ObjGetLen(req->wrk, req->objcore) == 0)
+ return;
+
req->res_mode |= RES_ESI_CHILD;
i = ObjCheckFlag(req->wrk, req->objcore, OF_GZIPED);
if (ecx->isgzip && i && !(req->res_mode & RES_ESI)) {
More information about the varnish-commit
mailing list