Permalink
Browse files

Ported fix for HTTPCLIENT-1224

  • Loading branch information...
ok2c committed Aug 24, 2012
1 parent d0068fb commit 8bdaa1661f5cb857ff091ee1d708a5acf536fd7a
@@ -697,12 +697,6 @@ private HttpRequest createConnectRequest(final HttpRoute route) {
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 @@ private RoutedRequest handleResponse() throws HttpException {
}
}
}
+ if (HttpClientParams.isRedirecting(this.params)) {
+ followup = handleRedirect();
+ if (followup != null) {
+ return followup;
+ }
+ }
return null;
}

0 comments on commit 8bdaa16

Please sign in to comment.