Skip to content
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

Merged
merged 10 commits into from
Mar 5, 2024

Conversation

TharmiganK
Copy link
Contributor

@TharmiganK TharmiganK commented Mar 5, 2024

Purpose

Related to: ballerina-platform/ballerina-library#6133

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 client URL but the Host 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 from 2201.7.x, we cannot add test with HTTP/2 in 2201.5.x. For the sake of completeness, I have back ported the pseudo headers fix with this PR

Related to: ballerina-platform/ballerina-library#4732

Examples

N/A

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec

Copy link

sonarcloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.57%. Comparing base (b8a0af2) to head (3fcee72).
Report is 1 commits behind head on 2201.5.x.

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@dilanSachi dilanSachi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TharmiganK TharmiganK merged commit 6e87539 into 2201.5.x Mar 5, 2024
6 checks passed
@TharmiganK TharmiganK deleted the host-header-fix-2201.5.x branch March 5, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants