This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The ESI_VDP would double-close sessions when a flush error happened
before an ESI include at one level, and then again at a higher level. Fixed by not closing the session in this case, as that will be taken care of at the end of delivery anyways when V1L_FlushRelease is called. Fixes: #1737 Submitted by: Martin
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
varnishtest "#1737 - ESI sublevel session close" | ||
|
||
# Build a esi request tree that fails on flush before include at two different | ||
# levels. Synchronize a client close after the response headers have been | ||
# received by the client. This produces write erros for the body parts in all | ||
# fragments. | ||
server s1 { | ||
rxreq | ||
txresp -body {<esi:include src="/bar"/><esi:include src="/bar"/>} | ||
sema r1 sync 2 | ||
|
||
rxreq | ||
delay 1 | ||
txresp -body {<esi:include src="/baz"/>22<esi:include src="/baz"/>} | ||
|
||
rxreq | ||
txresp -body {1} | ||
|
||
rxreq | ||
expect req.url == "/check" | ||
rxresp | ||
} -start | ||
|
||
varnish v1 -vcl+backend { | ||
sub vcl_backend_response { | ||
set beresp.do_esi = true; | ||
} | ||
} -start | ||
|
||
# Send request, read response headers then close connection | ||
client c1 { | ||
txreq | ||
rxresp -no_obj | ||
sema r1 sync 2 | ||
} -run | ||
|
||
delay 3 | ||
|
||
# Check that Varnish is alive | ||
client c1 { | ||
txreq | ||
rxresp | ||
} -run |