Repository navigation
[Bugfix] Serve requests compressed with deflate - #163
Merged
Merged
Conversation
Signed-off-by: MinJun Choi <mj04300017@gmail.com>
Perf: server cost per callHead
|
Signed-off-by: MinJun Choi <mj04300017@gmail.com>
Closed
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.
What this PR does / why we need it:
Fixes #155
Requests compressed with deflate always failed with
UNIMPLEMENTED, so a grpcio client with deflate turned on couldn't make any call. grpcio serves these fine.This enables tonic's
deflatefeature and accepts deflate alongside gzip. Responses are still sent uncompressed.gRPC's deflate is really the zlib format. tonic decodes it with
ZlibDecoder, so it matches what grpc-core sends.How it was tested:
OKfor unary and server-streaming calls, same as grpcio. Gzip and uncompressed calls behave as before.pytest tests: 306 passed, 1 skipped. Clippy, rustfmt and ruff are clean.NativeGrpcFront) pass with this wheel.NativeGrpcFrontandserver().If applicable: