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.
A PING or PONG between compressed message fragments clears
PerMessageDeflate's message-level compression state. The following continuation is then delivered as compressed bytes instead of the original binary payload.Keep control frames from initializing or clearing that state. The regression uses raw WebSocket frames and Python's zlib compressor through
Connection, with PING/PONG before, between and after fragments. It covers both directions, transport chunking, context takeover, a second message, and uncompressed/no-control cases. This also preserves the PING-before-message behavior fixed in #65.On Python 3.12.14/Linux, the new tests give 24 failures and 48 passes before the fix; the patched full suite passes all 302 tests. Strict mypy, source/wheel builds and the new test's formatter check pass. The other Python/platform combinations and documentation build were not run. An additional Ruff source check reports the same 22 findings on the original and patched source; that check is commented out in the current tox lint configuration.