Skip to content

Ignore the reserved bit in PUSH_PROMISE identifiers - #171

Open
vitalivo wants to merge 1 commit into
python-hyper:masterfrom
vitalivo:fix/push-promise-reserved-bit
Open

vitalivo wants to merge 1 commit into
python-hyper:masterfrom
vitalivo:fix/push-promise-reserved-bit

Conversation

@vitalivo

Copy link
Copy Markdown

Mask the reserved bit in PUSH_PROMISE stream IDs when reading and writing frames, matching the existing handling of GOAWAY and WINDOW_UPDATE. RFC 9113 section 6.6 defines a 31-bit promised stream identifier. Without the mask, a peer-set reserved bit leaks into the parsed ID, and the reserved bit alone bypasses the zero-ID check.

Seven regression cases fail before the fix and cover padded/unpadded parsing, zero-ID rejection, and serialization. Full tests pass with 100% branch coverage; source Ruff and strict mypy checks pass.

Specification: https://www.rfc-editor.org/rfc/rfc9113.html#section-6.6

@Kriechi

Kriechi commented Sep 16, 2026

Copy link
Copy Markdown
Member

Thanks! Seems like we have missed this in e1df3c4.

Would you mind adopting the same comments and style?

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