hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1612815 - /httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/MainClientExec.java
Date Wed, 23 Jul 2014 11:51:52 GMT
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;
                 }
             }
         }



Mime
View raw message