Skip to content

feat: Add support for HTTP/1.0 and HTTP/0.9#2577

Merged
arkodg merged 2 commits intoenvoyproxy:mainfrom
liorokman:ctp-http1-impl
Feb 9, 2024
Merged

feat: Add support for HTTP/1.0 and HTTP/0.9#2577
arkodg merged 2 commits intoenvoyproxy:mainfrom
liorokman:ctp-http1-impl

Conversation

@liorokman
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
This PR implements the API for enabling HTTP/1.0 and HTTP/0.9 (#2534)

Signed-off-by: Lior Okman <lior.okman@sap.com>
@liorokman liorokman requested a review from a team as a code owner February 8, 2024 08:26
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (d44f4be) 64.11% compared to head (6bf516b) 64.04%.

Files Patch % Lines
internal/ir/zz_generated.deepcopy.go 0.00% 20 Missing ⚠️
internal/gatewayapi/clienttrafficpolicy.go 86.44% 6 Missing and 2 partials ⚠️
internal/xds/translator/listener.go 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2577      +/-   ##
==========================================
- Coverage   64.11%   64.04%   -0.08%     
==========================================
  Files         119      119              
  Lines       18561    18627      +66     
==========================================
+ Hits        11901    11930      +29     
- Misses       5880     5912      +32     
- Partials      780      785       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Lior Okman <lior.okman@sap.com>
if http1Settings.HTTP10 != nil {
var defaultHost *string
if ptr.Deref(http1Settings.HTTP10.UseDefaultHost, false) {
for _, hostname := range httpIR.Hostnames {
Copy link
Copy Markdown
Contributor

@arkodg arkodg Feb 9, 2024

Choose a reason for hiding this comment

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

imo we should make this more strict - making sure a single hostname exists and it doesnt include a wildcard (even *.example.com should be rejected)

Copy link
Copy Markdown
Contributor Author

@liorokman liorokman Feb 9, 2024

Choose a reason for hiding this comment

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

making sure a single hostname exists and it doesnt include a wildcard (even *.example.com should be rejected)

It's already like this.

I couldn't find a way to create a test that defines a Gateway resource which would translate to the Hostnames array containing more than one entry at any time. Notice that the Gateway resource doesn't allow providing more than one hostname per listener.

The code initializes the array so that it always contains exactly one entry - either the single value supported by the Listener structure or a wildcard entry.

Copy link
Copy Markdown
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

@arkodg arkodg requested review from a team February 9, 2024 19:14
@arkodg arkodg merged commit 5acc233 into envoyproxy:main Feb 9, 2024
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.

2 participants