hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r554003 - /jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
Date Fri, 06 Jul 2007 19:16:19 GMT
Author: olegk
Date: Fri Jul  6 12:16:18 2007
New Revision: 554003

URL: http://svn.apache.org/viewvc?view=rev&rev=554003
Log:
Fixed bug in #determineRoute() causing secure (layered) connections to be treated as plain
ones.

Modified:
    jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java

Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java?view=diff&rev=554003&r1=554002&r2=554003
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
(original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
Fri Jul  6 12:16:18 2007
@@ -274,15 +274,17 @@
         HttpHost proxy = (HttpHost) request.getParams().getParameter(
                 HttpClientParams.DEFAULT_PROXY);
 
+        Scheme schm = getConnectionManager().getSchemeRegistry().
+            getScheme(target.getSchemeName());
+        // as it is typically used for TLS/SSL, we assume that
+        // a layered scheme implies a secure connection
+        boolean secure = schm.isLayered();
+        
         HttpRoute route;
         if (proxy == null) {
-            route = new HttpRoute(target);
+            route = new HttpRoute(target, null, secure);
         } else {
-            Scheme schm = getConnectionManager().getSchemeRegistry().
-            getScheme(target.getSchemeName());
-            // as it is typically used for TLS/SSL, we assume that
-            // a layered scheme implies a secure connection
-            route = new HttpRoute(target, null, proxy, schm.isLayered());
+            route = new HttpRoute(target, null, proxy, secure);
         }
         return new RoutedRequest.Impl(request, route);
     }



Mime
View raw message