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 target = route.getTargetHost();
|
||||||
final HttpHost proxy = route.getProxyHost();
|
final HttpHost proxy = route.getProxyHost();
|
||||||
HttpResponse response;
|
HttpResponse response = null;
|
||||||
|
|
||||||
final String authority = target.toHostString();
|
final String authority = target.toHostString();
|
||||||
final HttpRequest connect = new BasicHttpRequest("CONNECT", authority, request.getProtocolVersion());
|
final HttpRequest connect = new BasicHttpRequest("CONNECT", authority, request.getProtocolVersion());
|
||||||
|
|
||||||
this.requestExecutor.preProcess(connect, this.proxyHttpProcessor, context);
|
this.requestExecutor.preProcess(connect, this.proxyHttpProcessor, context);
|
||||||
|
|
||||||
for (;;) {
|
while (response == null) {
|
||||||
if (!managedConn.isOpen()) {
|
if (!managedConn.isOpen()) {
|
||||||
this.connManager.connect(
|
this.connManager.connect(
|
||||||
managedConn,
|
managedConn,
|
||||||
|
@ -491,11 +491,8 @@ public class MainClientExec implements ClientExecChain {
|
||||||
} else {
|
} else {
|
||||||
managedConn.close();
|
managedConn.close();
|
||||||
}
|
}
|
||||||
} else {
|
response = null;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue