Repository navigation
Discard DATA frames received on streams refused prior to activation - #1540
Merged
arturobernalg merged 1 commit intoNov 28, 2026
Merged
arturobernalg merged 1 commit into
arturobernalg merged 1 commit into
Conversation
Streams refused during connection shutdown are never activated and remain flagged as reserved; DATA in flight on such streams must not be treated as a connection PROTOCOL_ERROR (regression from 814622c).
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the HTTP/2 graceful-shutdown fix.
No open issues 🎉
What changed in this PR
Fixes an HTTP/2 graceful-shutdown regression where in-flight DATA on streams refused before activation could trigger a connection-level protocol error and disrupt existing exchanges.
Changes:
- Exempts locally reset streams from the reserved-stream DATA rejection.
- Exposes the local-reset state through
H2Stream. - Adds a regression test verifying that DATA on a refused stream does not prevent an existing stream from continuing.
| File | Description |
|---|---|
httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/TestAbstractH2StreamMultiplexer.java |
Tests refused-stream DATA handling during graceful shutdown. |
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2Stream.java |
Adds an accessor for the channel’s local-reset state. |
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java |
Allows locally reset reserved streams to bypass the protocol-error check. |
Review effort: Balanced
ok2c
approved these changes
Nov 28, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Streams refused during connection shutdown are never activated and remain flagged as reserved; DATA in flight on such streams must not be treated as a connection PROTOCOL_ERROR (regression from 814622c).