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

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

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

liorokman
Copy link
Contributor

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

@liorokman liorokman requested a review from a team as a code owner February 8, 2024 08:26
Copy link

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 <[email protected]>
if http1Settings.HTTP10 != nil {
var defaultHost *string
if ptr.Deref(http1Settings.HTTP10.UseDefaultHost, false) {
for _, hostname := range httpIR.Hostnames {
Copy link
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
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
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
17 checks passed
vixns pushed a commit to vixns/gateway that referenced this pull request Feb 18, 2024
* feat: Add support for HTTP/1.0 and HTTP/0.9

Signed-off-by: Lior Okman <[email protected]>

* Make the linter happy

Signed-off-by: Lior Okman <[email protected]>

---------

Signed-off-by: Lior Okman <[email protected]>
Signed-off-by: Stéphane Cottin <[email protected]>
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