mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Fix POST 303 redirect resonse handling
This fixes issue #1156. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
@@ -106,7 +106,7 @@ class SessionRedirectMixin(object):
|
||||
url = urljoin(resp.url, requote_uri(url))
|
||||
|
||||
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
|
||||
if resp.status_code is codes.see_other and req.method != 'HEAD':
|
||||
if resp.status_code == codes.see_other and req.method != 'HEAD':
|
||||
method = 'GET'
|
||||
|
||||
# Do what the browsers do, despite standards...
|
||||
|
||||
Reference in New Issue
Block a user