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.
H2Connection.send_headersdocumented that "It is a protocol error for a server to open a stream by sending headers", but the implementation created the stream regardless of connection side: a fresh server connection could send HEADERS on an even-numbered stream and open it. A server-initiated stream is only legal after PUSH_PROMISE, whichpush_stream()handles.A guard in
send_headersnow raisesProtocolErrorwhen the server sends HEADERS on a stream not already inself.streams, before any state or output is mutated. Client behavior, upgrade stream 1, and PUSH_PROMISE-reserved streams are unchanged.Verification: base source fails the new server test (
DID NOT RAISE); with the fixtests/test_basic_logic.pyis 392 passed and the full suite is 1687 passed.ruff checkon source andmypy --strict-bytespass; three lint errors in the test file are pre-existing on base. A server upgrade sanity check also passes.