-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nginx: stop HTTP/3 steam read when skipping request data
There's a few cases where nginx wants to skip over request payload data but not immediately finalize the request. For HTTP/3, there is potential for nginx to get into a tight loop when processing the client connection. This is because quiche's `poll()` API always presents DATA events for open streams wth buffered data. When the skip flag is set to true, nginx does not drain quiche's buffer, resulting in repeated DATA events for the same thing as long as the stream is active. In most cases when the skip flag is set, the request is finalized immediately. This change covers the remaining cases where the stream is not finalized immediately. We now use `quiche_conn_stream_shutdown()` to stop the read part of the stream, which effectively discards quiche's buffering for the stream and prevents endless DATA events. Shutting only the read side allows any pending response data to be sent but prevents skippable request data from tying up the connection. Signed-off-by: Diab Neiroukh <lazerl0rd@thezest.dev>
- Loading branch information
Showing
4 changed files
with
34 additions
and
0 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
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