HTTPCLIENT-1531: CONNECT via proxy fails if authentication is disabled
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1612816 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9e4c8332f8
commit
4216fc1f10
|
@ -450,14 +450,14 @@ public class MainClientExec implements ClientExecChain {
|
|||
|
||||
final HttpHost target = route.getTargetHost();
|
||||
final HttpHost proxy = route.getProxyHost();
|
||||
HttpResponse response;
|
||||
HttpResponse response = null;
|
||||
|
||||
final String authority = target.toHostString();
|
||||
final HttpRequest connect = new BasicHttpRequest("CONNECT", authority, request.getProtocolVersion());
|
||||
|
||||
this.requestExecutor.preProcess(connect, this.proxyHttpProcessor, context);
|
||||
|
||||
for (;;) {
|
||||
while (response == null) {
|
||||
if (!managedConn.isOpen()) {
|
||||
this.connManager.connect(
|
||||
managedConn,
|
||||
|
@ -491,11 +491,8 @@ public class MainClientExec implements ClientExecChain {
|
|||
} else {
|
||||
managedConn.close();
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
response = null;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue