Skip to content

HTTP/2: ignore unused PADDED flag on non-padded frames#640

Open
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:h2-ignore-unused-padded-flag
Open

HTTP/2: ignore unused PADDED flag on non-padded frames#640
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:h2-ignore-unused-padded-flag

Conversation

@arturobernalg
Copy link
Member

RawFrame readers were applying PADDED semantics whenever flag 0x08 was set, regardless of frame type. This violates RFC 9113 flag handling rules and can cause spurious PROTOCOL_ERROR (e.g., on PING frames).

RFC 9113, Section 4.1 states: “Unused flags MUST be ignored on receipt and MUST be left unset (0x00) when sending.

Raw frame readers were applying PADDED semantics whenever flag 0x08 was set, even for frame types that do not define padding, which violates RFC 9113. This change gates padding validation to DATA, HEADERS, and PUSH_PROMISE only, and reads the Pad Length as an unsigned octet in the NIO path. RFC says: “Unused flags MUST be ignored on receipt and MUST be left unset (0x00) when sending."
@arturobernalg arturobernalg requested a review from ok2c February 24, 2026 13:59
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.

1 participant