hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
Subject svn commit: r606453 - in /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http: conn/params/ConnRoutePNames.java impl/conn/DefaultHttpRoutePlanner.java impl/conn/ProxySelectorRoutePlanner.java
Date Sat, 22 Dec 2007 14:24:32 GMT
Author: rolandw
Date: Sat Dec 22 06:24:30 2007
New Revision: 606453

URL: http://svn.apache.org/viewvc?rev=606453&view=rev
Log:
HTTPCLIENT-716: removed context lookup for forced route

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java?rev=606453&r1=606452&r2=606453&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/params/ConnRoutePNames.java
Sat Dec 22 06:24:30 2007
@@ -68,16 +68,13 @@
 
     /**
      * Parameter for an forced route.
-     * The forced route can be set as a parameter or a context attribute.
-     * If both are present, the context attribute takes precedence.
      * The forced route will be interpreted by the standard
      * {@link org.apache.http.conn.HttpRoutePlanner HttpRoutePlanner}
      * implementations.
      * Instead of computing a route, the given forced route will be
      * returned, even if it points to the wrong target host.
      * <p>
-     * This parameter or context attribute should be used with care.
-     * It expects a value of type
+     * This parameter expects a value of type
      * {@link org.apache.http.conn.HttpRoute HttpRoute}.
      * </p>
      */

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java?rev=606453&r1=606452&r2=606453&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/DefaultHttpRoutePlanner.java
Sat Dec 22 06:24:30 2007
@@ -50,7 +50,8 @@
 /**
  * Default implementation of an {@link HttpRoutePlanner}.
  * This implementation is based on {@link ConnRoutePNames parameters}.
- * It will not make use of any Java system properties.
+ * It will not make use of any Java system properties,
+ * nor of system or browser proxy settings.
  */
 public class DefaultHttpRoutePlanner implements HttpRoutePlanner {
     
@@ -81,17 +82,8 @@
         }
 
         // If we have a forced route, we can do without a target.
-        // Check the context first, it might have been set by a retry handler.
-        HttpRoute route = null;
-        if (context != null) {
-            route = (HttpRoute)
-                context.getAttribute(ConnRoutePNames.FORCED_ROUTE);
-        }
-        if (route == null) {
-            route = (HttpRoute)
-                request.getParams().getParameter(ConnRoutePNames.FORCED_ROUTE);
-        }
-
+        HttpRoute route = (HttpRoute)
+            request.getParams().getParameter(ConnRoutePNames.FORCED_ROUTE);
         if (route != null)
             return route;
 

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java?rev=606453&r1=606452&r2=606453&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/conn/ProxySelectorRoutePlanner.java
Sat Dec 22 06:24:30 2007
@@ -90,17 +90,8 @@
         }
 
         // If we have a forced route, we can do without a target.
-        // Check the context first, it might have been set by a retry handler.
-        HttpRoute route = null;
-        if (context != null) {
-            route = (HttpRoute)
-                context.getAttribute(ConnRoutePNames.FORCED_ROUTE);
-        }
-        if (route == null) {
-            route = (HttpRoute)
-                request.getParams().getParameter(ConnRoutePNames.FORCED_ROUTE);
-        }
-
+        HttpRoute route = (HttpRoute)
+            request.getParams().getParameter(ConnRoutePNames.FORCED_ROUTE);
         if (route != null)
             return route;
 



Mime
View raw message