You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2014/07/23 13:51:52 UTC
svn commit: r1612815 -
/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java
Author: olegk
Date: Wed Jul 23 11:51:52 2014
New Revision: 1612815
URL: http://svn.apache.org/r1612815
Log:
HTTPCLIENT-1531: CONNECT via proxy fails if authentication is disabled
Modified:
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java?rev=1612815&r1=1612814&r2=1612815&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java Wed Jul 23 11:51:52 2014
@@ -433,14 +433,14 @@ public class MainClientExec implements C
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,
@@ -474,11 +474,8 @@ public class MainClientExec implements C
} else {
managedConn.close();
}
- } else {
- break;
+ response = null;
}
- } else {
- break;
}
}
}