Eugen Covaci created HTTPCLIENT-2074:
----------------------------------------
Summary: HttpClient incorrectly parses the CONNECT request URI
Key: HTTPCLIENT-2074
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2074
Project: HttpComponents HttpClient
Issue Type: Bug
Components: HttpClient (classic)
Affects Versions: 5.0
Reporter: Eugen Covaci
I do have a server socket listening on a local port. Using Postman, I'm making
a CONNECT request to the server socket for an random address, let's say
www.iana.org:443. Then I'm trying to parse the request using:
{code:java}
SessionInputBufferImpl inputBuffer = new SessionInputBufferImpl(bufferSize);
ClassicHttpRequest request = new DefaultHttpRequestParser().parse(inputBuffer,
localSocketChannel.getInputStream());
URI requestUri = request.getUri();
{code}
The requestUri I get is "/" instead of the initial "www.iana.org:443".
Also, calling request.toString() I get "CONNECT www.iana.org://null/" which is
definitely wrong.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]