[master] ef4730d93 Emit a VCL_Error SLT when we exceed ESI depth

Poul-Henning Kamp phk at FreeBSD.org
Mon Oct 15 06:59:14 UTC 2018


commit ef4730d93fee8779a2972e473b62c8c8d9d2ba03
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat Oct 13 07:05:53 2018 +0000

    Emit a VCL_Error SLT when we exceed ESI depth

diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 067e64470..468504fcd 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -108,8 +108,12 @@ ved_include(struct req *preq, const char *src, const char *host,
 	CHECK_OBJ_NOTNULL(ecx, ECX_MAGIC);
 	wrk = preq->wrk;
 
-	if (preq->esi_level >= cache_param->max_esi_depth)
+	if (preq->esi_level >= cache_param->max_esi_depth) {
+		VSLb(preq->vsl, SLT_VCL_Error,
+		    "ESI depth limit reach (param max_esi_depth = %u",
+		    cache_param->max_esi_depth);
 		return;
+	}
 
 	req = Req_New(wrk, sp);
 	SES_Ref(sp);


More information about the varnish-commit mailing list