-
Notifications
You must be signed in to change notification settings - Fork 4.6k
client: allow overriding grpc-accept-encoding header #8718
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8718 +/- ##
==========================================
+ Coverage 83.21% 83.24% +0.02%
==========================================
Files 419 419
Lines 32427 32475 +48
==========================================
+ Hits 26985 27034 +49
- Misses 4054 4055 +1
+ Partials 1388 1386 -2
🚀 New features to boost your workflow:
|
|
Hey @iblancasa , thank you for the PR! Before we make the changes , we should probably discuss and decide among the different suggestions Doug had in the issue :
cc : @dfawley |
|
Thanks for your quick response @eshitachandwani. I would be fine with the current solution or @dfawley suggestion. I'm willing to contribute that approach if it is what is being decided. |
|
Since the headers are sent per-call, this kind of a setting really wants to be a I think the basic idea here is fine and doesn't overlap with my suggestion of a separate registry of compressors per-channel. This would be saying "for this call, only allow compressors x/y/z for responses". There's also the question of what to do if the response comes back with a compressor the client technically supports, but isn't advertising for that call. Should it be cancelled or allowed? Also I would prefer to add this as experimental until we can determine it is fine as-is and doesn't need different behavior or a different API. These days we are doing that by adding something into the |
|
@dfawley thanks for your feedback. I tried to address it in my last push. Regarding:
I feel it makes sense to not accept it. I implemented on that way. We can change it in the future if we receive some feedback. What do you think? |
Signed-off-by: Israel Blancas <[email protected]>
|
दरबारी |
grpc.WithAcceptedCompressionNamesso a client can explicitly cap thegrpc-accept-encodingheader to a vetted subset of registered compressorscompressors when needed
Updates #2786.
RELEASE NOTES:
grpc-accept-encodingheader advertised by a ClientConn.