netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods#9004
Merged
ejona86 merged 5 commits intogrpc:masterfrom Mar 22, 2022
Merged
netty: Support pseudo headers in all GrpcHttp2RequestHeaders methods#9004ejona86 merged 5 commits intogrpc:masterfrom
ejona86 merged 5 commits intogrpc:masterfrom
Conversation
The previous code assumed that only gRPC would be using these methods. But twice now Netty has made a change (generally relating to security) that used a method for pseudo headers that previously wasn't supported. Let's stop the whack-a-mole and just implement them all. This restores compatibility with Netty 4.1.75.Final. Fixes grpc#8981
ejona86
commented
Mar 21, 2022
| AsciiString value = requireAsciiString(csValue); | ||
| if (isPseudoHeader(name)) { | ||
| addPseudoHeader(name, value); | ||
| AsciiString previous = getPseudoHeader(name); |
Member
Author
There was a problem hiding this comment.
It'd be possible to implement this without a get-then-set if setPseudoHeader() returned the old value. We'd have to re-set the old value if there was one already present, but that's not the worst. Returning-old-valuesetPseudoHeader() would seem to most benefit remove(), but it isn't safe for remove because it would throw for remove(":status'). Having the returning-old-value setPseudoHeader() made it really easy to make mistakes, so I went with the KISS approach. These code paths don't matter for performance.
sergiitk
approved these changes
Mar 21, 2022
I had these changes locally, but failed to use "-a" for my "git commit" to add them...
njhill
reviewed
Mar 21, 2022
This was referenced Mar 22, 2022
lhotari
added a commit
to lhotari/pulsar
that referenced
this pull request
Apr 19, 2022
- grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004
lhotari
added a commit
to lhotari/pulsar
that referenced
this pull request
Apr 19, 2022
- grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004
lhotari
added a commit
to lhotari/pulsar
that referenced
this pull request
Apr 19, 2022
- grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004
lhotari
added a commit
to apache/pulsar
that referenced
this pull request
Apr 19, 2022
) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes #14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004
Nicklee007
pushed a commit
to Nicklee007/pulsar
that referenced
this pull request
Apr 20, 2022
…che#15212) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes apache#14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004
lhotari
added a commit
to datastax/pulsar
that referenced
this pull request
Apr 20, 2022
…che#15212) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes apache#14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004 (cherry picked from commit 332a3c7)
gaoran10
pushed a commit
to apache/pulsar
that referenced
this pull request
Apr 21, 2022
) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes #14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004 (cherry picked from commit 332a3c7)
gaoran10
pushed a commit
to apache/pulsar
that referenced
this pull request
Apr 21, 2022
) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes #14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004 (cherry picked from commit 332a3c7)
lhotari
added a commit
to datastax/pulsar
that referenced
this pull request
Apr 22, 2022
…che#15212) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes apache#14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004 (cherry picked from commit 332a3c7)
lhotari
added a commit
to datastax/pulsar
that referenced
this pull request
Apr 22, 2022
…che#15212) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes apache#14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004 (cherry picked from commit 332a3c7)
codelipenghui
pushed a commit
to apache/pulsar
that referenced
this pull request
Apr 28, 2022
) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes #14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004 (cherry picked from commit 332a3c7)
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Apr 28, 2022
…che#15212) * Upgrade Netty to 4.1.76.Final and Netty Tcnative to 2.0.51.Final Fixes apache#14015 - release notes https://netty.io/news/2022/04/12/4-1-76-Final.html - contains fix for netty/netty#11695 * Upgrade grpc to 1.45.1 and protobuf to 3.19.2 - grpc < 1.45.1 is not compatible with Netty > 4.1.74.Final - grpc/grpc-java#9004 (cherry picked from commit 332a3c7)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The previous code assumed that only gRPC would be using these methods.
But twice now Netty has made a change (generally relating to security)
that used a method for pseudo headers that previously wasn't supported.
Let's stop the whack-a-mole and just implement them all.
This restores compatibility with Netty 4.1.75.Final. Fixes #8981
CC @njhill
Alternative to #9001