[master] 054215b51 Also test ESI onerror with max_esi_depth reached

Nils Goroll nils.goroll at uplex.de
Fri Feb 24 17:03:07 UTC 2023


commit 054215b51ede8caefa856e27e8328fac0ddba737
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Feb 24 18:00:08 2023 +0100

    Also test ESI onerror with max_esi_depth reached
    
    With onerror=abort, the request is aborted as with a bad return code.
    
    With onerror=continue, the include remains empty
    
    This already behaved like I expected it to, this vtc merely adds
    an explicit test.

diff --git a/bin/varnishtest/tests/r03865.vtc b/bin/varnishtest/tests/r03865.vtc
index 98f706b5b..3bb1994e5 100644
--- a/bin/varnishtest/tests/r03865.vtc
+++ b/bin/varnishtest/tests/r03865.vtc
@@ -38,6 +38,20 @@ client c1 {
 	expect resp.body == "before "
 } -run
 
+varnish v1 -cliok "param.set max_esi_depth 0"
+
+client c1 {
+	txreq -url "/abort"
+	non_fatal
+	rxresphdrs
+	expect resp.status == 200
+	rxchunk
+	expect_close
+	expect resp.body == "before "
+} -run
+
+varnish v1 -cliok "param.set max_esi_depth 1"
+
 varnish v1 -vsl_catchup
 
 server s1 -wait
@@ -55,3 +69,12 @@ client c1 {
 	rxresp
 	expect resp.body == "before FOOBAR after"
 } -run
+
+varnish v1 -cliok "param.set max_esi_depth 0"
+
+client c1 {
+	fatal
+	txreq -url "/continue"
+	rxresp
+	expect resp.body == "before  after"
+} -run


More information about the varnish-commit mailing list