Repository navigation
Conversation
Base automatically changed from
reject-unknown-connect-stream-compression
to
main
September 27, 2026 13:04
Each server path looked up the request compression on its own, and the copies drifted apart: #365 fixed an unknown Connect stream compression being treated as identity, Connect unary POST lowercasing the name, and empty encodings being accepted on some paths only. Resolve the name in resolve_request_compression instead, so every path treats an empty name as identity and matches names exactly. No behavior change. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: i2y <6240399+i2y@users.noreply.github.com>
i2y
force-pushed
the
resolve-request-compression
branch
from
September 27, 2026 13:05
2f647a8 to
a02f71a
Compare
This branch has not been deployed
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.
Each server path looked up the request compression on its own: Connect unary POST and GET in both
_server_async.pyand_server_sync.py, plusnegotiate_stream_compressionin_protocol_connect.pyand_protocol_grpc.py. The copies drifted apart, and #365 fixed three cases of it: an unknown Connect stream compression was treated as identity, Connect unary POST lowercased the name, and only some paths accepted an empty encoding.This moves the lookup into
resolve_request_compressionin_compression.py, next tounknown_compression_error. It treats an empty name as identity, matches names exactly, and returnsNonefor an unknown name, so callers still raiseunknown_compression_errorwhere they did before. There's no behavior change: the tests from #365 pass unchanged, and a small unit test covers the helper.uv run poe checkand the server conformance suites pass.This doesn't add conflicts with #361 beyond the ones it already has with
main. The trio path in #348 goes throughnegotiate_stream_compression, so it picks this up as is.