hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1463725 - in /httpcomponents/httpasyncclient/trunk: ./ httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/ httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ httpasyncclient/src/test/java/org/apache/http/nio/...
Date Tue, 02 Apr 2013 20:09:08 GMT
Author: olegk
Date: Tue Apr  2 20:09:08 2013
New Revision: 1463725

URL: http://svn.apache.org/r1463725
Log:
Upgraded HttpClient to version 4.3-alpha1; fixed API incompatibilities

Added:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ParamConfig.java
  (with props)
Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidator.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestRedirects.java
    httpcomponents/httpasyncclient/trunk/pom.xml

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java?rev=1463725&r1=1463724&r2=1463725&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidationRequest.java
Tue Apr  2 20:09:08 2013
@@ -31,10 +31,10 @@ import java.io.IOException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.ProtocolException;
 import org.apache.http.client.cache.HttpCacheEntry;
+import org.apache.http.client.methods.HttpRequestWrapper;
 import org.apache.http.concurrent.FutureCallback;
 import org.apache.http.protocol.HttpContext;
 
@@ -46,7 +46,7 @@ class AsynchronousAsyncValidationRequest
     private final AsynchronousAsyncValidator parent;
     private final CachingHttpAsyncClient cachingAsyncClient;
     private final HttpHost target;
-    private final HttpRequest request;
+    private final HttpRequestWrapper request;
     private final HttpContext context;
     private final HttpCacheEntry cacheEntry;
     private final String identifier;
@@ -58,7 +58,7 @@ class AsynchronousAsyncValidationRequest
      * revalidation.
      */
     AsynchronousAsyncValidationRequest(final AsynchronousAsyncValidator parent,
-            final CachingHttpAsyncClient cachingClient, final HttpHost target, final HttpRequest
request,
+            final CachingHttpAsyncClient cachingClient, final HttpHost target, final HttpRequestWrapper
request,
             final HttpContext context, final HttpCacheEntry cacheEntry, final String identifier)
{
         this.parent = parent;
         this.cachingAsyncClient = cachingClient;

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidator.java?rev=1463725&r1=1463724&r2=1463725&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidator.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousAsyncValidator.java
Tue Apr  2 20:09:08 2013
@@ -38,8 +38,8 @@ import java.util.concurrent.TimeUnit;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
 import org.apache.http.client.cache.HttpCacheEntry;
+import org.apache.http.client.methods.HttpRequestWrapper;
 import org.apache.http.protocol.HttpContext;
 
 /**
@@ -100,7 +100,7 @@ class AsynchronousAsyncValidator {
      * @param context
      * @param entry
      */
-    public synchronized void revalidateCacheEntry(final HttpHost target, final HttpRequest
request,
+    public synchronized void revalidateCacheEntry(final HttpHost target, final HttpRequestWrapper
request,
             final HttpContext context, final HttpCacheEntry entry) {
         // getVariantURI will fall back on getURI if no variants exist
         final String uri = this.cacheKeyGenerator.getVariantURI(target, request, entry);

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java?rev=1463725&r1=1463724&r2=1463725&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient-cache/src/main/java/org/apache/http/impl/client/cache/CachingHttpAsyncClient.java
Tue Apr  2 20:09:08 2013
@@ -54,6 +54,7 @@ import org.apache.http.client.cache.Head
 import org.apache.http.client.cache.HttpCacheEntry;
 import org.apache.http.client.cache.HttpCacheStorage;
 import org.apache.http.client.cache.ResourceFactory;
+import org.apache.http.client.methods.HttpRequestWrapper;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.concurrent.BasicFuture;
 import org.apache.http.concurrent.FutureCallback;
@@ -71,6 +72,7 @@ import org.apache.http.params.HttpParams
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.util.VersionInfo;
 
+@SuppressWarnings("deprecation")
 @ThreadSafe // So long as the responseCache implementation is threadsafe
 public class CachingHttpAsyncClient implements HttpAsyncClient {
 
@@ -121,7 +123,7 @@ public class CachingHttpAsyncClient impl
         this.backend = client;
         this.responseCache = cache;
         this.validityPolicy = new CacheValidityPolicy();
-        this.responseCachingPolicy = new ResponseCachingPolicy(this.maxObjectSizeBytes, this.sharedCache);
+        this.responseCachingPolicy = new ResponseCachingPolicy(this.maxObjectSizeBytes, this.sharedCache,
false);
         this.responseGenerator = new CachedHttpResponseGenerator(this.validityPolicy);
         this.cacheableRequestPolicy = new CacheableRequestPolicy();
         this.suitabilityChecker = new CachedResponseSuitabilityChecker(this.validityPolicy,
config);
@@ -136,7 +138,7 @@ public class CachingHttpAsyncClient impl
     public CachingHttpAsyncClient() throws IOReactorException {
         this(new DefaultHttpAsyncClient(),
                 new BasicHttpCache(),
-                new CacheConfig());
+                CacheConfig.DEFAULT);
     }
 
     public CachingHttpAsyncClient(final CacheConfig config) throws IOReactorException {
@@ -148,7 +150,7 @@ public class CachingHttpAsyncClient impl
     public CachingHttpAsyncClient(final HttpAsyncClient client) {
         this(client,
                 new BasicHttpCache(),
-                new CacheConfig());
+                CacheConfig.DEFAULT);
     }
 
     public CachingHttpAsyncClient(final HttpAsyncClient client, final CacheConfig config)
{
@@ -187,7 +189,7 @@ public class CachingHttpAsyncClient impl
             final ConditionalRequestBuilder conditionalRequestBuilder,
             final ResponseProtocolCompliance responseCompliance,
             final RequestProtocolCompliance requestCompliance) {
-        final CacheConfig config = new CacheConfig();
+        final CacheConfig config = CacheConfig.DEFAULT;
         this.maxObjectSizeBytes = config.getMaxObjectSize();
         this.sharedCache = config.isSharedCache();
         this.backend = backend;
@@ -280,15 +282,17 @@ public class CachingHttpAsyncClient impl
         return this.backend.getConnectionManager();
     }
 
+    @Deprecated
     public HttpParams getParams() {
         return this.backend.getParams();
     }
 
     public Future<HttpResponse> execute(
             final HttpHost target,
-            final HttpRequest request,
+            final HttpRequest originalRequest,
             final HttpContext context,
             final FutureCallback<HttpResponse> futureCallback) {
+        final HttpRequestWrapper request = HttpRequestWrapper.wrap(originalRequest);
         // default response context
         setResponseStatus(context, CacheResponseStatus.CACHE_MISS);
 
@@ -309,29 +313,28 @@ public class CachingHttpAsyncClient impl
             return future;
         }
 
-        HttpRequest httRequest = request;
         try {
-            httRequest = this.requestCompliance.makeRequestCompliant(request);
+            this.requestCompliance.makeRequestCompliant(request);
         } catch (final ClientProtocolException e) {
             final BasicFuture<HttpResponse> future = new BasicFuture<HttpResponse>(futureCallback);
             future.failed(e);
             return future;
         }
-        httRequest.addHeader("Via",via);
+        request.addHeader("Via",via);
 
-        flushEntriesInvalidatedByRequest(target, httRequest);
+        flushEntriesInvalidatedByRequest(target, request);
 
-        if (!this.cacheableRequestPolicy.isServableFromCache(httRequest)) {
-            return callBackend(target, httRequest, context, futureCallback);
+        if (!this.cacheableRequestPolicy.isServableFromCache(request)) {
+            return callBackend(target, request, context, futureCallback);
         }
 
-        final HttpCacheEntry entry = satisfyFromCache(target, httRequest);
+        final HttpCacheEntry entry = satisfyFromCache(target, request);
         if (entry == null) {
-            return handleCacheMiss(target, httRequest, context, futureCallback);
+            return handleCacheMiss(target, request, context, futureCallback);
         }
 
         try {
-            return handleCacheHit(target, httRequest, context, entry, futureCallback);
+            return handleCacheHit(target, request, context, entry, futureCallback);
         } catch (final ClientProtocolException e) {
             final BasicFuture<HttpResponse> future = new BasicFuture<HttpResponse>(futureCallback);
             future.failed(e);
@@ -343,7 +346,7 @@ public class CachingHttpAsyncClient impl
         }
     }
 
-    private Future<HttpResponse> handleCacheHit(final HttpHost target, final HttpRequest
request,
+    private Future<HttpResponse> handleCacheHit(final HttpHost target, final HttpRequestWrapper
request,
             final HttpContext context, final HttpCacheEntry entry,
             final FutureCallback<HttpResponse> futureCallback)
             throws ClientProtocolException, IOException {
@@ -369,7 +372,7 @@ public class CachingHttpAsyncClient impl
     }
 
     private Future<HttpResponse> revalidateCacheEntry(final HttpHost target,
-            final HttpRequest request, final HttpContext context, final HttpCacheEntry entry,
+            final HttpRequestWrapper request, final HttpContext context, final HttpCacheEntry
entry,
             final Date now, final FutureCallback<HttpResponse> futureCallback) throws
ClientProtocolException {
         this.log.debug("Revalidating the cache entry");
 
@@ -409,7 +412,7 @@ public class CachingHttpAsyncClient impl
         }
     }
 
-    private Future<HttpResponse> handleCacheMiss(final HttpHost target, final HttpRequest
request,
+    private Future<HttpResponse> handleCacheMiss(final HttpHost target, final HttpRequestWrapper
request,
             final HttpContext context, final FutureCallback<HttpResponse> futureCallback)
{
         recordCacheMiss(target, request);
 
@@ -631,7 +634,9 @@ public class CachingHttpAsyncClient impl
         return true;
     }
 
-    Future<HttpResponse> callBackend(final HttpHost target, final HttpRequest request,
final HttpContext context, final FutureCallback<HttpResponse> futureCallback) {
+    Future<HttpResponse> callBackend(
+            final HttpHost target, final HttpRequestWrapper request, final HttpContext context,
+            final FutureCallback<HttpResponse> futureCallback) {
         final Date requestDate = getCurrentDate();
         this.log.debug("Calling the backend");
         return this.backend.execute(target, request, context, new FutureCallback<HttpResponse>()
{
@@ -681,7 +686,7 @@ public class CachingHttpAsyncClient impl
     }
 
     Future<HttpResponse> negotiateResponseFromVariants(final HttpHost target,
-            final HttpRequest request, final HttpContext context,
+            final HttpRequestWrapper request, final HttpContext context,
             final Map<String, Variant> variants,
             final FutureCallback<HttpResponse> futureCallback) {
         final HttpRequest conditionalRequest = this.conditionalRequestBuilder.buildConditionalRequestFromVariants(request,
variants);
@@ -750,7 +755,6 @@ public class CachingHttpAsyncClient impl
                         }
 
                     });
-                    return;
                 }
 
                 final HttpCacheEntry matchedEntry = matchingVariant.getEntry();
@@ -787,9 +791,9 @@ public class CachingHttpAsyncClient impl
     }
 
     private void retryRequestUnconditionally(final HttpHost target,
-            final HttpRequest request, final HttpContext context,
+        final HttpRequestWrapper request, final HttpContext context,
             final HttpCacheEntry matchedEntry, final FutureCallback<HttpResponse> futureCallback)
{
-        final HttpRequest unconditional = this.conditionalRequestBuilder
+        final HttpRequestWrapper unconditional = this.conditionalRequestBuilder
             .buildUnconditionalRequest(request, matchedEntry);
         callBackend(target, unconditional, context, futureCallback);
     }
@@ -825,12 +829,12 @@ public class CachingHttpAsyncClient impl
 
     Future<HttpResponse> revalidateCacheEntry(
             final HttpHost target,
-            final HttpRequest request,
+            final HttpRequestWrapper request,
             final HttpContext context,
             final HttpCacheEntry cacheEntry,
             final FutureCallback<HttpResponse> futureCallback) throws ProtocolException
{
 
-        final HttpRequest conditionalRequest = this.conditionalRequestBuilder.buildConditionalRequest(request,
cacheEntry);
+        final HttpRequestWrapper conditionalRequest = this.conditionalRequestBuilder.buildConditionalRequest(request,
cacheEntry);
         final Date requestDate = getCurrentDate();
         return this.backend.execute(target, conditionalRequest, context, new FutureCallback<HttpResponse>()
{
 
@@ -880,11 +884,11 @@ public class CachingHttpAsyncClient impl
 
     private void revalidateCacheEntryCompleted(
             final HttpHost target,
-            final HttpRequest request,
+            final HttpRequestWrapper request,
             final HttpContext context,
             final HttpCacheEntry cacheEntry,
             final FutureCallback<HttpResponse> futureCallback,
-            final HttpRequest conditionalRequest,
+            final HttpRequestWrapper conditionalRequest,
             final Date requestDate,
             final HttpResponse httpResponse,
             final Date responseDate) {
@@ -942,7 +946,7 @@ public class CachingHttpAsyncClient impl
 
     HttpResponse handleBackendResponse(
             final HttpHost target,
-            final HttpRequest request,
+            final HttpRequestWrapper request,
             final Date requestDate,
             final Date responseDate,
             final HttpResponse backendResponse) throws IOException {

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java?rev=1463725&r1=1463724&r2=1463725&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java
Tue Apr  2 20:09:08 2013
@@ -54,9 +54,11 @@ import org.apache.http.client.NonRepeata
 import org.apache.http.client.RedirectException;
 import org.apache.http.client.RedirectStrategy;
 import org.apache.http.client.UserTokenHandler;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.methods.AbortableHttpRequest;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.client.params.ClientPNames;
+import org.apache.http.client.params.HttpClientParamConfig;
 import org.apache.http.client.params.HttpClientParams;
 import org.apache.http.client.protocol.ClientContext;
 import org.apache.http.client.utils.URIUtils;
@@ -230,6 +232,8 @@ class DefaultAsyncRequestDirector<T> imp
             wrapper.setParams(this.params);
             final HttpRoute route = determineRoute(target, wrapper, this.localContext);
             this.mainRequest = new RoutedRequest(wrapper, route);
+            RequestConfig config = ParamConfig.getRequestConfig(params);
+            this.localContext.setAttribute(ClientContext.REQUEST_CONFIG, config);
             this.requestContentProduced = false;
             requestConnection();
         } catch (final Exception ex) {
@@ -286,6 +290,7 @@ class DefaultAsyncRequestDirector<T> imp
         this.localContext.setAttribute(ExecutionContext.HTTP_TARGET_HOST, target);
         this.localContext.setAttribute(ExecutionContext.HTTP_PROXY_HOST, proxy);
         this.localContext.setAttribute(ExecutionContext.HTTP_CONNECTION, this.managedConn);
+        this.localContext.setAttribute(ClientContext.ROUTE, route);
 
         if (this.currentRequest == null) {
             this.currentRequest = this.mainRequest.getRequest();

Added: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ParamConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ParamConfig.java?rev=1463725&view=auto
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ParamConfig.java
(added)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ParamConfig.java
Tue Apr  2 20:09:08 2013
@@ -0,0 +1,69 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+package org.apache.http.impl.nio.client;
+
+import java.util.Collection;
+
+import org.apache.http.auth.params.AuthPNames;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.params.ClientPNames;
+import org.apache.http.client.params.HttpClientParams;
+import org.apache.http.conn.params.ConnRouteParams;
+import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.HttpParams;
+import org.apache.http.params.HttpProtocolParams;
+
+@Deprecated
+final class ParamConfig {
+
+    private ParamConfig() {
+    }
+
+    @SuppressWarnings("unchecked")
+    public static RequestConfig getRequestConfig(final HttpParams params) {
+        return RequestConfig.custom()
+                .setAuthenticationEnabled(HttpClientParams.isAuthenticating(params))
+                .setCircularRedirectsAllowed(params.getBooleanParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS,
false))
+                .setConnectionRequestTimeout((int) HttpClientParams.getConnectionManagerTimeout(params))
+                .setConnectTimeout(HttpConnectionParams.getConnectionTimeout(params))
+                .setCookieSpec(HttpClientParams.getCookiePolicy(params))
+                .setProxy(ConnRouteParams.getDefaultProxy(params))
+                .setExpectContinueEnabled(HttpProtocolParams.useExpectContinue(params))
+                .setLocalAddress(ConnRouteParams.getLocalAddress(params))
+                .setMaxRedirects(params.getIntParameter(ClientPNames.MAX_REDIRECTS, 50))
+                .setProxyPreferredAuthSchemes((Collection<String>) params.getParameter(
+                        AuthPNames.PROXY_AUTH_PREF))
+                .setTargetPreferredAuthSchemes((Collection<String>) params.getParameter(
+                        AuthPNames.TARGET_AUTH_PREF))
+                .setRedirectsEnabled(HttpClientParams.isRedirecting(params))
+                .setRelativeRedirectsAllowed(!params.getBooleanParameter(ClientPNames.REJECT_RELATIVE_REDIRECT,
false))
+                .setSocketTimeout(HttpConnectionParams.getSoTimeout(params))
+                .setStaleConnectionCheckEnabled(HttpConnectionParams.isStaleCheckingEnabled(params))
+                .build();
+    }
+
+}

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ParamConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ParamConfig.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/ParamConfig.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestRedirects.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestRedirects.java?rev=1463725&r1=1463724&r2=1463725&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestRedirects.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/test/java/org/apache/http/nio/client/integration/TestRedirects.java
Tue Apr  2 20:09:08 2013
@@ -506,6 +506,7 @@ public class TestRedirects extends HttpA
         final HttpHost target = start(registry, null);
 
         this.httpclient.getParams().setBooleanParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS,
false);
+        this.httpclient.getParams().setBooleanParameter(ClientPNames.REJECT_RELATIVE_REDIRECT,
false);
 
         final HttpGet httpget = new HttpGet("/circular-oldlocation/");
 

Modified: httpcomponents/httpasyncclient/trunk/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/pom.xml?rev=1463725&r1=1463724&r2=1463725&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/pom.xml (original)
+++ httpcomponents/httpasyncclient/trunk/pom.xml Tue Apr  2 20:09:08 2013
@@ -66,7 +66,7 @@
 
   <properties>
     <httpcore.version>4.3-alpha1</httpcore.version>
-    <httpclient.version>4.2.3</httpclient.version>
+    <httpclient.version>4.3-alpha1</httpclient.version>
     <commons-logging.version>1.1.1</commons-logging.version>
     <!-- Note IO 2.3+ requires Java 6 -->
     <commons-io.version>2.2</commons-io.version>



Mime
View raw message