if (localHttpHost == null)
{
this.log.debug("Target host not set in the context");
return;
}
HttpRoutedConnection localHttpRoutedConnection = (HttpRoutedConnection)paramHttpContext.getAttribute("http.connection");
if (localHttpRoutedConnection == null)
{
this.log.debug("HTTP connection not set in the context");
return;
}
String str2 = HttpClientParams.getCookiePolicy(paramHttpRequest.getParams());
if (this.log.isDebugEnabled())
this.log.debug("CookieSpec selected: " + str2);
URI localURI;
if ((paramHttpRequest instanceof HttpUriRequest))
localURI = ((HttpUriRequest)paramHttpRequest).getURI();
else
try
{
localURI = new URI(paramHttpRequest.getRequestLine().getUri());
}
catch (URISyntaxException localURISyntaxException)
{
throw new ProtocolException("Invalid request URI: " + paramHttpRequest.getRequestLine().getUri(), localURISyntaxException);
}
String str3 = localHttpHost.getHostName();
int i = localHttpHost.getPort();
if (i < 0)
{
localObject1 = localHttpRoutedConnection.getRoute();
if (((HttpRoute)localObject1).getHopCount() == 1)
{
i = localHttpRoutedConnection.getRemotePort();
}
else
{
localObject2 = localHttpHost.getSchemeName();
if (((String)localObject2).equalsIgnoreCase("http"))
i = 80;
else if (((String)localObject2).equalsIgnoreCase("https"))
i = 443;
else
i = 0;
}
}
Object localObject1 = new CookieOrigin(str3, i, localURI.getPath(), localHttpRoutedConnection.isSecure());
Object localObject2 = localCookieSpecRegistry.getCookieSpec(str2, paramHttpRequest.getParams());
ArrayList localArrayList1 = new ArrayList(localCookieStore.getCookies());
ArrayList localArrayList2 = new ArrayList();
Date localDate = new Date();
Object localObject3 = localArrayList1.iterator();