Skip to content
Myr

Only the path should be encoded (not the query, otherwise it makes a wrong redirection).

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

authored by Jérémy Bethmont · committed by Jérémy Bethmont · parent 3b085ed · Browse files · 1 file+5 added−2 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+5 added−2 removed

  • other:+5 added−2 removed

1 file+5 added−2 removed

modified:requests/models.py+5 added-2 removed
222 unmodified lines
223 url = '%s:%s' % (parsed_rurl.scheme, url)224225 # Facilitate non-RFC2616-compliant 'location' headers226 # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')227 if not urlparse(url).netloc:228 url = urljoin(r.url, urllib.quote(urllib.unquote(url)))227 parsed_url = urlparse(url)228 if not parsed_url.netloc:229 parsed_url = list(parsed_url)230 parsed_url[2] = urllib.quote(urllib.unquote(parsed_url[2]))231 url = urljoin(r.url, str(urlunparse(parsed_url)))232233 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4234 if r.status_code is codes.see_other:235 method = 'GET'
391 unmodified lines