-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
client: set grpc-accept-encoding to full list of registered compressors #5541
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Overall it looks pretty good. Comments inline, and one higher level comment:
I'm at least a little nervous about enabling this by default. It may be better to have this controlled by a dial option that either lists the codecs the user wants to expose or enables/disables this functionality. I'll get back to you about this part.
98a34eb
to
36d6f4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the long delay here. I discussed this with the other language leads and we think a change like this should be good. If it isn't too much trouble, would you mind putting this behavior behind an environment variable (turned on by default), so that, in case users run into trouble in the next couple releases, they can disable it? See: https://github.com/grpc/grpc-go/blob/master/internal/envconfig/envconfig.go
Thank you!
60f2cb7
to
511c171
Compare
LGTM. Could you please take a pass on this, too, @easwars ? |
Part of #2786 (rest fixes in follow-up PRs)
Description:
In the current implementation, we forward
grpc-accept-encoding
only when the client sets compression on the outgoing RPCs. With this pull request, all the compressors registered withencoding.RegisterCompressor
are added under thegrpc-accept-encoding
header for the outgoing RPCs.When the client enables compression using deprecated
grpc.WithCompressor
, stick to the old behaviour of setting thegrpc-accept-header
header to the outgoing compressor.RELEASE NOTES: