-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Send VFP_END with last data for v1f chunked
While working on request body caching improvements, it was noticed that, for chunked encoding, we do not know the request body size before we have attempted to read at least one additional byte because the chunked fetch did not return VFP_END with the last chunk, but rather only as a zero-length additional chunk. This commit changes chunked encoding processing to read the next chunk header before returning the last bytes of the previous chunk. This allows to return VFP_END properly. Test cases are adjusted accordingly. Diff is best viewed with -b option
- Loading branch information
Showing
8 changed files
with
88 additions
and
67 deletions.
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 |
---|---|---|
@@ -1,32 +1,23 @@ | ||
varnishtest "Check that aborted backend body aborts client in streaming mode" | ||
|
||
barrier b1 cond 2 | ||
barrier b2 cond 2 | ||
|
||
server s1 { | ||
rxreq | ||
txresp -nolen -hdr "Transfer-encoding: chunked" | ||
chunked {<HTML>} | ||
send "00000004\n" | ||
barrier b1 sync | ||
chunked {<HTML>} | ||
barrier b2 sync | ||
} -start | ||
|
||
varnish v1 -cliok "param.set debug +syncvsl" -vcl+backend { | ||
|
||
} -start | ||
|
||
|
||
client c1 { | ||
txreq | ||
rxresphdrs | ||
expect resp.status == 200 | ||
rxchunk | ||
barrier b1 sync | ||
rxchunk | ||
barrier b2 sync | ||
expect_close | ||
} -run | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -91,6 +91,7 @@ client c1 { | |
chunked {BLAST} | ||
delay .2 | ||
chunkedlen 106 | ||
chunkedlen 1 | ||
expect_close | ||
} -run | ||
|
||
|
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
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
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