Package: python-requests Severity: important Tags: patch thanks I've attached upstream's fix. Some bits:
Caused by using `is' on ints, rather then "==". Upstream bug 1156[1], fixed in commit b07c1ebd859a32e1203c1d4ef27f1fb9e154e55e (attached). This violates a "SHOULD" in the HTTP/1.1 RFC, and it'd be really nice to get this fixed for wheezy, if there is a way to get such a small change in. Thanks, Paul [1]: https://github.com/kennethreitz/requests/issues/1156 [2]: https://github.com/kennethreitz/requests/commit/b07c1ebd859a32e1203c1d4ef27f1fb9e154e55e -- .''`. Paul Tagliamonte <paul...@debian.org> : :' : Proud Debian Developer `. `'` 4096R / 8F04 9AD8 2C92 066C 7352 D28A 7B58 5B30 807C 2A87 `- http://people.debian.org/~paultag
From b07c1ebd859a32e1203c1d4ef27f1fb9e154e55e Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh <yeh...@inktank.com> 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 <yeh...@inktank.com> --- 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 @@ def resolve_redirects(self, resp, req, stream=False, timeout=None, verify=True, 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... -- 1.7.10
signature.asc
Description: Digital signature
_______________________________________________ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team