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
[Netty4] Correct handling for absolute URIs in HTTP request lines #639
Conversation
public void testAbsoluteURI() throws Exception { | ||
String uri = generateURL("/test"); | ||
|
||
Socket client = new Socket(getHost(), getPort()); |
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.
This tests uses sockets directly since the Resteasy client builders don't support making requests with absolute URIs in the request line.
@patriot1burke Can you take a look at this change? It looked to me like a divergence from the HTTP spec, and reproducible easily with RxNetty. |
Hi Avram, I have a suggestion for a test:
and
} This test proves that NettyUtil is using the given absolute URI in the GET line rather than constructing a URI. |
Other than that, the patch looks good. Avram, could you create a JIRA issue here: https://jira.jboss.org/browse/RESTEASY ? |
…ike: ``` GET http://www.example.com/testContent HTTP/1.1 Host: www.example.com ```
Fixed and rebased vs master. Issue incoming. |
Thanks, Avram. Looks good to merge. |
[Netty4] Correct handling for absolute URIs in HTTP request lines
Correctly handle requests with an absolute URI in the request line, like:
This is required per the spec: http://tools.ietf.org/html/rfc2616#section-5, specifically:
And:
Issue: https://issues.jboss.org/browse/RESTEASY-1193