-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
h3: earlier checks for control and QPACK stream termination
A peer can FIN or reset a control stream at any point during the stream lifetime. While doing so is an error in HTTP/3, our handling before this change was a bit odd. Previously, depending on the sequencing, an unexpected termination of such a stream could trigger an InvalidStreamState or StreamReset error during poll(). This would bubble up to the app, which is weird and unexpected because the quiche h3 layer is supposed to deal with all the control stream details. While both those errors contain a stream ID, the app isn't given any info that the ID is a control stream. While any subsequent call to poll() would then cause the stream_finished detection to kick in and enforce the RFC rules to close the connection with CloseCriticialStream, that's a bit late and clunky. This change adds additional checks for the control and QPACK stream terminations in order to make sure we close connections at the earliest time and prevent useless errors getting bubbled up to apps.
- Loading branch information
Showing
2 changed files
with
227 additions
and
52 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