-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http2: discard DATA frames with higher stream IDs during graceful shu…
…tdown If the server sends a GOAWAY at the same time that a client sends HEADERS+DATA, the server will discard the HEADERS, but error on the DATA frame. Luckily, the server doesn't turn this into a connection error because it's already in a GOAWAY state. It just logs the PROTOCOL_ERROR, but that produces a confusing log message. This change effectively suppresses the log message by discarding the DATA frame rather than erroring on it. Also, we now discard any frames for streams with identifiers higher than the identified last stream. This is done as per section 6.8 of the HTTP2 spec. I also updated some stale documentation while I was trying to understand the logic. This is CL 188360 with a test Fixes golang/go#32112 Co-authored-by: Yunchi Luo <[email protected]> Co-authored-by: Michael Fraenkel <[email protected]> Change-Id: I612c2bd82e37551e813af0961b16a98d14e77c38 Reviewed-on: https://go-review.googlesource.com/c/net/+/237957 Run-TryBot: Agniva De Sarker <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> Reviewed-by: Emmanuel Odeke <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Damien Neil <[email protected]>
- Loading branch information
1 parent
3d97a24
commit 39120d0
Showing
2 changed files
with
90 additions
and
10 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