code: public boolean handleRedirect(int statusCode, HttpHeaders responseHeaders) {
      String redirectLocation = responseHeaders.getLocation();
      if (getFollowRedirects()
          && HttpStatusCodes.isRedirect(statusCode)
          && redirectLocation != null) {
        // resolve the redirect location relative to the current location
        setUrl(new GenericUrl(url.toURL(redirectLocation)));
        // on 303 change method to GET
        if (statusCode == HttpStatusCodes.STATUS_CODE_SEE_OTHER) {
          setRequestMethod(HttpMethods.GET);
          // GET requests do not support non-zero content length
          setContent(null);
        }
        // remove Authorization and If-* headers
        headers.setAuthorization((String) null);
        headers.setIfMatch((String) null);
        headers.setIfNoneMatch((String) null);
        headers.setIfModifiedSince((String) null);
        headers.setIfUnmodifiedSince((String) null);
        headers.setIfRange((String) null);
        return true;
      }
      return false;
    }
docs: Sets up this request object to handle the necessary redirect if redirects are turned on, it is
  a redirect status code and the header has a location.
  
  <p>When the status code is {@code 303} the method on the request is changed to a GET as per the
  RFC2616 specification. On a redirect, it also removes the {@code "Authorization"} and all
  {@code "If-*"} request headers.
  
  <p>Upgrade warning: When handling a status code of 303, {@link #handleRedirect(int,
  HttpHeaders)} now correctly removes any content from the body of the new request, as GET
  requests should not have content. It did not do this in prior version 1.16.
  
  @return whether the redirect was successful
  @since 1.11