Fixed parameter mixup in HttpClientParamConfig#getRequestConfig

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1442151 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2013-02-04 15:28:32 +00:00
parent f6f1d7af49
commit 305357a488
1 changed files with 2 additions and 2 deletions

View File

@ -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();