code: private boolean isRedirectNeeded(final HttpMethod method) {
  		switch (method.getStatusCode()) {
  			case HttpStatus.SC_MOVED_TEMPORARILY:
  			case HttpStatus.SC_MOVED_PERMANENTLY:
  			case HttpStatus.SC_SEE_OTHER:
  			case HttpStatus.SC_TEMPORARY_REDIRECT:
  				LOG.debug("Redirect required");
                  if (method.getFollowRedirects()) {
                      return true;
                  } else {
                      return false;
                  }
  			default:
  				return false;
  		} //end of switch
  	}
docs: Tests if the {@link HttpMethod method} requires a redirect to another location.
  
  @param method HTTP method
  
  @return boolean <tt>true</tt> if a retry is needed, <tt>false</tt> otherwise.