Repository navigation
Conversation
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.
Frame.serialize()currently emits a body of 16,777,216 bytes with a zero-length header because the length is truncated to 24 bits. Reject bodies aboveFRAME_MAX_ALLOWED_LENwithInvalidFrameErrorbefore building the header, while preserving the valid 16,777,215-byte boundary. The check includes padding and other serialized body overhead.Seven regression cases cover DATA and CONTINUATION maximum-size round trips, rejection at maximum plus one and plus two, and overflow caused by the PADDED length byte. Includes a changelog entry naming
Frame.serialize().ExtensionFrame.serialize()is a separate override and remains outside this patch; #169 addresses its stale body length. Peer-negotiated lower frame limits remain the caller's responsibility, and the check runs after body allocation. This is separate from the SETTINGS flag handling in #175 and header parsing tests in #173.Validation on macOS ARM64 / CPython 3.14.4: 155 tests passed, including the pinned HTTP/2 fixture collection, with 100% statement and branch coverage. Configured source Ruff, strict mypy, HTML documentation, and whitespace checks passed. Five of the seven regression cases failed against the original runtime source. Other platforms and Python versions were not run locally.
AI assistance was used for the investigation, implementation, tests, validation, and PR text.