HTTP/2: require peer SETTINGS as first frame#636
Merged
arturobernalg merged 1 commit intoapache:masterfrom Feb 24, 2026
Merged
Conversation
ok2c
reviewed
Feb 23, 2026
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
Outdated
Show resolved
Hide resolved
56541f0 to
6803eed
Compare
ok2c
approved these changes
Feb 24, 2026
Enforce RFC 9113 connection preface rules by rejecting non-SETTINGS frames received before the peer SETTINGS once the connection handshake is active.
6803eed to
98932d0
Compare
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.
Enforce RFC 9113 connection preface rules by rejecting non-SETTINGS frames received before the peer SETTINGS once the connection handshake is active.
RFC 9113, Section 3.4: That is, the connection preface starts with the string "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n". This sequence MUST be followed by a SETTINGS frame (Section 6.5), which MAY be empty. The client sends the client connection preface as the first application data octets of a connection.
RFC 9113, Section 6.5: Receipt of a SETTINGS frame with the ACK flag set and a length field value other than 0 MUST be treated as a connection error (Section 5.4.1) of type FRAME_SIZE_ERROR. For more information, see Section 6.5.3 ("Settings Synchronization").