[6.0] 7f7908008 Emit a VCL_Error SLT when we exceed ESI depth

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Oct 31 13:08:31 UTC 2018


commit 7f790800813359274102112ba64b173d25646362
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 1e238d854..1ce7ea4ca 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