Skip to content
Myr

url was already parsed, don't urlparse twice

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Matt Robenolt · committed by Matt Robenolt · parent 9dc6602 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:requests/sessions.py+1 added-1 removed
127 unmodified lines
128129 # Facilitate relative 'location' headers, as allowed by RFC 7231.130 # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')131 # Compliant with RFC3986, we percent encode the url.132 if not urlparse(url).netloc:132 if not parsed.netloc:133 url = urljoin(resp.url, requote_uri(url))134 else:135 url = requote_uri(url)136
537 unmodified lines