471464 - Parsing issues with HttpURI

Fixed parsing of CONNECT URIs
This commit is contained in:
Greg Wilkins 2015-07-01 15:23:32 +10:00
parent 75640039fd
commit 13ce021e5e
2 changed files with 12 additions and 1 deletions

View File

@ -175,6 +175,14 @@ public class HttpURI
parse(State.START,uri,0,uri.length());
}
/* ------------------------------------------------------------ */
public void parseConnect(String uri)
{
clear();
_uri=uri;
_path=uri;
}
/* ------------------------------------------------------------ */
public void parse(String uri, int offset, int length)
{

View File

@ -101,6 +101,9 @@ class HttpChannelOverHttp extends HttpChannel implements HttpParser.RequestHandl
public boolean startRequest(String method, String uri, HttpVersion version)
{
_metadata.setMethod(method);
if (HttpMethod.CONNECT.is(method))
_metadata.getURI().parseConnect(uri);
else
_metadata.getURI().parse(uri);
_metadata.setHttpVersion(version);
_unknownExpectation = false;