-
Notifications
You must be signed in to change notification settings - Fork 85
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
[2201.5.x] Fix overwriting the Host header #1881
Conversation
(cherry picked from commit 35ad764)
ccb3eae
to
7a479ba
Compare
ballerina-tests/http2-tests/tests/http2_service_dispatching_header_param_binding_test.bal
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2201.5.x #1881 +/- ##
==============================================
+ Coverage 81.54% 81.57% +0.02%
Complexity 524 524
==============================================
Files 388 388
Lines 21064 21064
Branches 4702 4703 +1
==============================================
+ Hits 17176 17182 +6
+ Misses 2904 2901 -3
+ Partials 984 981 -3 ☔ View full report in Codecov by Sentry. |
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
Purpose
Note: With this improvement users can override the
Host
header, but this does not change the connection internals. We will still connect to the endpoint defined in the clientURL
but theHost
header send in the request can be overridable. This is in line with the cURL client.For HTTP/2, we expose the
Host
header from the pseudo header. Since the pseudo header exposure is added from2201.7.x
, we cannot add test with HTTP/2 in2201.5.x
. For the sake of completeness, I have back ported the pseudo headers fix with this PRExamples
N/A
Checklist
Updated the spec