Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: gzip encoding support #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: gzip encoding support #134

wants to merge 2 commits into from

Conversation

TheRTK
Copy link

@TheRTK TheRTK commented Feb 25, 2023

Issue

I faced with the problem that the client with gzip compression when sending a request to gripmock gets an error:

rpc error: code = Unimplemented desc = grpc: Decompressor is not installed for grpc-encoding \"gzip\"

Solution

I added a import with encoding/gzip to the file server.tmpl.
This will not affect requests without gzip. GRPS will use this only if a compressor is used in the request:
https://github.com/grpc/grpc-go/blob/3151e834fa2536844f801bb132c684fbb10364fd/server.go#L1269-#L1280

* gzip support with example and integration test
@TheRTK TheRTK marked this pull request as ready for review February 25, 2023 18:51
@fedemengo
Copy link

@jekiapp can we merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants