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

[UNDERTOW-2422] Return the protocol field of the HttpServerExchange into the status line #1644

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EarthJeff
Copy link

@EarthJeff EarthJeff commented Aug 6, 2024

Issue: https://issues.redhat.com/browse/UNDERTOW-2422

Currently, no matter what you set the HttpServerExchange.protocol field to, the value "HTTP/1.1" will always be used. This change will use the value of the protocol field (or "HTTP/1.1" if the field is empty) in the HTTP response's status line.

There is a test included in this PR. It confirms the default behavior and the new behavior.

@ropalka ropalka requested a review from fl4via August 6, 2024 17:33
@ropalka ropalka added bug fix Contains bug fix(es) under verification Currently being verified (running tests, reviewing) before posting a review to contributor waiting peer review PRs that edit core classes might require an extra review labels Aug 6, 2024
@EarthJeff
Copy link
Author

@ropalka The two test failures on JDK17-core, Mac and Windows, are "Buffer Leaks", which are listed as intermittent in the known test issues ticket. The failure in testRstOnPush in JDK11-ipv6 on ubuntu is, I think, another intermittent. I believe in the prior CI run, this same test failed in a different environment, and succeeded in this run. I believe that this CI run should be treated as having succeeded and that testRstOnPush should be added to the known issues list.

@baranowb baranowb self-requested a review August 14, 2024 08:37
Copy link
Contributor

@baranowb baranowb left a comment

Choose a reason for hiding this comment

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

Id merge those 4 into 1 commit.

@EarthJeff
Copy link
Author

I have squashed the 4 commits into 1.

@@ -0,0 +1,141 @@
/*
* JBoss, Home of Professional Open Source.
Copy link
Member

Choose a reason for hiding this comment

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

Please, update the year to 2024

throw UndertowMessages.MESSAGES.protocolTooLargeForBuffer(protocolString);
}
protocol.appendTo(buffer);
// append status code, reasopn phrase, and headers
Copy link
Member

Choose a reason for hiding this comment

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

small typo

@fl4via fl4via added waiting PR update Awaiting PR update(s) from contributor before merging and removed under verification Currently being verified (running tests, reviewing) before posting a review to contributor waiting peer review PRs that edit core classes might require an extra review labels Aug 22, 2024
…ine.

Add tests for this and the default behavior.
@EarthJeff
Copy link
Author

@fl4via I have made the requested changes (and squashed the commit).

@fl4via fl4via added next release This PR will be merged before next release or has already been merged (for payload double check) waiting CI check Ready to be merged but waiting for CI check and removed waiting PR update Awaiting PR update(s) from contributor before merging labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Contains bug fix(es) next release This PR will be merged before next release or has already been merged (for payload double check) waiting CI check Ready to be merged but waiting for CI check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants