Skip to content
Myr

Merge pull request #1158 from yehudasa/master

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

Fix check that breaks handling of 303 response in some cases (v2)

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 113b67c, b07c1eb · 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
104 unmodified lines
105 # Compliant with RFC3986, we percent encode the url.106 url = urljoin(resp.url, requote_uri(url))107108 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4109 if resp.status_code is codes.see_other and req.method != 'HEAD':109 if resp.status_code == codes.see_other and req.method != 'HEAD':110 method = 'GET'111112 # Do what the browsers do, despite standards...113 if resp.status_code in (codes.moved, codes.found) and req.method == 'POST':
296 unmodified lines