Skip to content

Commit

Permalink
Test that we do not explode hitting max_esi_depth
Browse files Browse the repository at this point in the history
  • Loading branch information
nigoroll committed Dec 11, 2023
1 parent 13cf51e commit 24b4343
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions bin/varnishtest/tests/e00029.vtc
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 24b4343

Please sign in to comment.