redirects++;
// See if the redirect limit is set on the client. If not, use 10.
if (redirects > client.getParams().getIntParameter(HttpClientParams.MAX_REDIRECTS, 10))
{
// Too many redirects. Something bad happened.
throw new RedirectException("Too many redirects");
}
HttpConnectionManager newConnMgr = null;
if (statusCode == 301) {