Skip to content

Comments

HTTP/2: require peer SETTINGS as first frame#636

Merged
arturobernalg merged 1 commit intoapache:masterfrom
arturobernalg:SettingsWhenActive
Feb 24, 2026
Merged

HTTP/2: require peer SETTINGS as first frame#636
arturobernalg merged 1 commit intoapache:masterfrom
arturobernalg:SettingsWhenActive

Conversation

@arturobernalg
Copy link
Member

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").

@arturobernalg arturobernalg requested a review from ok2c February 23, 2026 09:45
@arturobernalg arturobernalg force-pushed the SettingsWhenActive branch 2 times, most recently from 56541f0 to 6803eed Compare February 24, 2026 09:50
@arturobernalg arturobernalg requested a review from ok2c February 24, 2026 09:51
Enforce RFC 9113 connection preface rules by rejecting non-SETTINGS frames
received before the peer SETTINGS once the connection handshake is active.
@arturobernalg arturobernalg merged commit 434697b into apache:master Feb 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants