From b07c1ebd859a32e1203c1d4ef27f1fb9e154e55e Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 31 Jan 2013 10:32:00 -0800 Subject: [PATCH] Fix POST 303 redirect resonse handling This fixes issue #1156. Signed-off-by: Yehuda Sadeh --- requests/sessions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/sessions.py b/requests/sessions.py index de3f5b7..c0840f2 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -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... -- 2.7.4