457130 - HTTPS request with IP host and HTTP proxy throws IllegalArgumentException.

Fixed handling of cookies in case of null URI.
This commit is contained in:
Simone Bordet 2015-01-09 16:05:28 +01:00
parent b195e7ee20
commit c7d9c5c951
1 changed files with 5 additions and 6 deletions

View File

@ -135,14 +135,13 @@ public abstract class HttpConnection implements Connection
if (cookieStore != null)
{
URI uri = request.getURI();
StringBuilder cookies = null;
if (uri != null)
{
StringBuilder cookies = convertCookies(cookieStore.get(uri), null);
cookies = convertCookies(cookieStore.get(uri), null);
cookies = convertCookies(request.getCookies(), cookies);
if (cookies != null)
request.header(HttpHeader.COOKIE.asString(), cookies.toString());
}
}
// Authorization
URI authenticationURI = proxy != null ? proxy.getURI() : request.getURI();