You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2012/08/24 10:52:04 UTC

svn commit: r1376867 - /httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java

Author: olegk
Date: Fri Aug 24 08:52:04 2012
New Revision: 1376867

URL: http://svn.apache.org/viewvc?rev=1376867&view=rev
Log:
Ported fix for HTTPCLIENT-1224

Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/DefaultAsyncRequestDirector.java

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=1376867&r1=1376866&r2=1376867&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 Fri Aug 24 08:52:04 2012
@@ -697,12 +697,6 @@ class DefaultAsyncRequestDirector<T> imp
 
     private RoutedRequest handleResponse() throws HttpException {
         RoutedRequest followup = null;
-        if (HttpClientParams.isRedirecting(this.params)) {
-            followup = handleRedirect();
-            if (followup != null) {
-                return followup;
-            }
-        }
         if (HttpClientParams.isAuthenticating(this.params)) {
             CredentialsProvider credsProvider = (CredentialsProvider) this.localContext.getAttribute(
                     ClientContext.CREDS_PROVIDER);
@@ -717,6 +711,12 @@ class DefaultAsyncRequestDirector<T> imp
                 }
             }
         }
+        if (HttpClientParams.isRedirecting(this.params)) {
+            followup = handleRedirect();
+            if (followup != null) {
+                return followup;
+            }
+        }
         return null;
     }