'This is called by the http_error_30x methods when a
redirection response is received.  If a redirection should
take place, return a new Request to allow http_error_30x to
perform the redirect.'

def create_redirect_request(self, req, fp, code, msg, headers, new_url_str, new_url_obj):

    new_headers = dict(((k, v) for (k, v) in req.headers.items() if (k.lower() not in REMOVE_ON_REDIRECT)))
    orig_method = req.get_method()
    method = (orig_method if (orig_method in {'GET', 'HEAD'}) else 'GET')
    new_request = HTTPRequest(new_url_obj, headers=new_headers, origin_req_host=req.get_origin_req_host(), method=method, timeout=req.timeout, unverifiable=True, follow_redirects=True, cookies=req.cookies, cache=req.get_from_cache, error_handling=req.error_handling, retries=req.retries_left, new_connection=req.new_connection, use_basic_auth=req.use_basic_auth)
    return new_request
