-
Notifications
You must be signed in to change notification settings - Fork 2k
Suppress connection and content-length headers #2224
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2224 +/- ##
==========================================
+ Coverage 46.99% 47.34% +0.35%
==========================================
Files 69 69
Lines 6090 6102 +12
==========================================
+ Hits 2862 2889 +27
+ Misses 2970 2952 -18
- Partials 258 261 +3
Continue to review full report at Codecov.
|
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.
I would also extract the switch to a membership check in a set of strings, but we can also leave for later PR.
Co-authored-by: Nghia Tran <[email protected]>
Co-authored-by: Nghia Tran <[email protected]>
Falls into this category: https://tools.ietf.org/html/rfc7540#section-8.1.2.2 This means that an intermediary transforming an HTTP/1.x message to
HTTP/2 will need to remove any header fields nominated by the
Connection header field, along with the Connection header field
itself. Such intermediaries SHOULD also remove other connection-
specific header fields, such as Keep-Alive, Proxy-Connection,
Transfer-Encoding, and Upgrade, even if they are not nominated by the
Connection header field. We're not exactly translating HTTP 1.1-> 2.0 - but we are tunneling an individual HTTP message. |
Let me add these headers to the http/1.1 specific header list. |
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.
lgtm
Description
Suppress
connection
andcontent-length
headers.In http->gRPC invocation scenario, translating HTTP 1.1 request headers to gRPC request metadata, both headers are copied to GRPC metadata. However, both headers are applicable only for http 1.1. gRPC over Kestrel server validate these headers for http 2 connection unlike the other gRPC implementation. So we can see the problem only in .net gRPC service application.
This PR will added
dapr-
prefix to two headers to suppress them.Reference:
Issue reference
#2221
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: