hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1442151 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParamConfig.java
Date Mon, 04 Feb 2013 15:28:33 GMT
Author: olegk
Date: Mon Feb  4 15:28:32 2013
New Revision: 1442151

URL: http://svn.apache.org/viewvc?rev=1442151&view=rev
Log:
Fixed parameter mixup in HttpClientParamConfig#getRequestConfig

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParamConfig.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParamConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParamConfig.java?rev=1442151&r1=1442150&r2=1442151&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParamConfig.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/params/HttpClientParamConfig.java
Mon Feb  4 15:28:32 2013
@@ -51,7 +51,7 @@ public final class HttpClientParamConfig
     public static RequestConfig getRequestConfig(final HttpParams params) {
         return RequestConfig.custom()
                 .setAuthenticationEnabled(HttpClientParams.isAuthenticating(params))
-                .setCircularRedirectsAllowed(params.isParameterFalse(ClientPNames.REJECT_RELATIVE_REDIRECT))
+                .setCircularRedirectsAllowed(params.getBooleanParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS,
false))
                 .setConnectionRequestTimeout((int) HttpClientParams.getConnectionManagerTimeout(params))
                 .setConnectTimeout(HttpConnectionParams.getConnectionTimeout(params))
                 .setCookieSpec(HttpClientParams.getCookiePolicy(params))
@@ -64,7 +64,7 @@ public final class HttpClientParamConfig
                 .setTargetPreferredAuthSchemes((Collection<String>) params.getParameter(
                         AuthPNames.TARGET_AUTH_PREF))
                 .setRedirectsEnabled(HttpClientParams.isRedirecting(params))
-                .setRelativeRedirectsAllowed(params.isParameterTrue(ClientPNames.ALLOW_CIRCULAR_REDIRECTS))
+                .setRelativeRedirectsAllowed(!params.getBooleanParameter(ClientPNames.REJECT_RELATIVE_REDIRECT,
false))
                 .setSocketTimeout(HttpConnectionParams.getSoTimeout(params))
                 .setStaleConnectionCheckEnabled(HttpConnectionParams.isStaleCheckingEnabled(params))
                 .build();



Mime
View raw message