Undocumented
Method | get_redirect_target |
Receives a Response. Returns a redirect URI or None |
Method | rebuild_auth |
When being redirected we may want to strip authentication from the request to avoid leaking credentials. This method intelligently removes and reapplies authentication where possible to avoid credential loss. |
Method | rebuild_method |
When being redirected we may want to change the method of the request based on certain specs or browser behavior. |
Method | rebuild_proxies |
No summary |
Method | resolve_redirects |
Receives a Response. Returns a generator of Responses or Requests. |
Method | should_strip_auth |
Decide whether Authorization header should be removed when redirecting |
This method re-evaluates the proxy configuration by considering the environment variables. If we are redirected to a URL covered by NO_PROXY, we strip the proxy configuration. Otherwise, we set missing proxy keys for this URL (in case they were stripped by a previous redirect).
This method also replaces the Proxy-Authorization header where necessary.
Returns | |
dict | Undocumented |