forked from grpc/grpc-java
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netty: Add Http2Headers.setLong() for inbound headers
Starting in Netty 4.1.60, Netty will validate Content-Length headers using getAll() and setLong(). While getAll() was documented as only used in tests, it doesn't appear it was currently used in any tests. While Http2NettyTest.contentLengthPermitted() was added to confirm that Content-Length works, it won't actually exercise any interesting behavior until we upgrade to Netty 4.1.60. However, I did test with Netty 4.1.60 and it reproduced the failure in grpc#7953 and passed with this change. Since Netty is now observing/modifying the headers, it would seem appropriate to implement a substantial portion of the Http2Headers API. However, the surface is much larger than we'd want to implement for a 'quick fix' that could be backported. In addition, it seems much of the API is just convenience methods, so it is probably appropriate to split out a AbstractHeaders class from DefaultHeaders in Netty that doesn't make any assumptions about the header storage mechanism.
- Loading branch information
Showing
3 changed files
with
135 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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