Mailing List Archive

[master] 24b434383 Test that we do not explode hitting max_esi_depth
commit 24b434383c616639d5aa9be9b5ba3647a418d64c
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Mon Dec 11 17:33:44 2023 +0100

Test that we do not explode hitting max_esi_depth

diff --git a/bin/varnishtest/tests/e00029.vtc b/bin/varnishtest/tests/e00029.vtc
new file mode 100644
index 000000000..556c05cca
--- /dev/null
+++ b/bin/varnishtest/tests/e00029.vtc
@@ -0,0 +1,41 @@
+varnishtest "ESI max_esi_depth"
+
+# test that the default stack size is sufficent for hitting
+# max_esi_depth
+
+server s1 {
+ rxreq
+ txresp -nolen -hdr "Transfer-Encoding: chunked"
+ chunked {<html>}
+ chunkedlen 1024
+ chunked {<esi:include src="/" onerror="continue"/>}
+ chunkedlen 1024
+ chunked {<esi:include src="/" onerror="continue"/>}
+ chunkedlen 1024
+ chunked {</html>}
+ chunkedlen 0
+} -start
+
+varnish v1 -arg "-p feature=+esi_include_onerror" -vcl+backend {
+ sub vcl_backend_response {
+ set beresp.do_esi = true;
+ set beresp.do_gzip = true;
+ }
+} -start
+
+logexpect l1 -v v1 -g raw {
+ expect * * VCL_Error {^ESI depth limit reached}
+ expect 0 = VCL_Error {^ESI depth limit reached}
+ expect * * VCL_Error {^ESI depth limit reached}
+ expect 0 = VCL_Error {^ESI depth limit reached}
+ expect * * VCL_Error {^ESI depth limit reached}
+ expect 0 = VCL_Error {^ESI depth limit reached}
+ #... more
+} -start
+
+client c1 {
+ txreq -hdr "Host: foo" -hdr "Accept-Encoding: gzip"
+ rxresp
+} -run
+
+logexpect l1 -wait
\ No newline at end of file
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit