Skip to content
Myr

Dont use requote_path when dealing with redirects.

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

This was breaking redirect locations with a query string, by quoting the question-mark. Since the path will be passed through requote_path on the next request anyway, doing it here seems unnecessary.

authored by Ryan Kelly · committed by Ryan Kelly · parent f7fdfe8 · 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/models.py+1 added-1 removed
212 unmodified lines
213214 # Facilitate non-RFC2616-compliant 'location' headers215 # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')216 if not urlparse(url).netloc:217 url = urljoin(r.url, requote_path(url))217 url = urljoin(r.url, url)218219 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4220 if r.status_code is codes.see_other:221 method = 'GET'
397 unmodified lines