[Python-modules-commits] r23522 - in packages/requests/branches/0.12.1/debian (3 files)
eriol-guest at users.alioth.debian.org
eriol-guest at users.alioth.debian.org
Tue Feb 19 03:36:29 UTC 2013
Date: Tuesday, February 19, 2013 @ 03:36:25
Author: eriol-guest
Revision: 23522
Fix POST 303 redirect resonse handling
Added:
packages/requests/branches/0.12.1/debian/patches/03_fix_post_303_redirect_response_handling.patch
Modified:
packages/requests/branches/0.12.1/debian/changelog
packages/requests/branches/0.12.1/debian/patches/series
Modified: packages/requests/branches/0.12.1/debian/changelog
===================================================================
--- packages/requests/branches/0.12.1/debian/changelog 2013-02-19 02:09:11 UTC (rev 23521)
+++ packages/requests/branches/0.12.1/debian/changelog 2013-02-19 03:36:25 UTC (rev 23522)
@@ -1,3 +1,11 @@
+requests (0.12.1-2) UNRELEASED; urgency=low
+
+ * debian/patches/03_fix_post_303_redirect_response_handling.patch
+ - Fix POST 303 redirect resonse handling. Thanks to Paul
+ Tagliamonte and Jakub Wilk for the report! (Closes: #699844)
+
+ -- Daniele Tricoli <eriol at mornie.org> Tue, 19 Feb 2013 04:23:54 +0100
+
requests (0.12.1-1) unstable; urgency=low
* New upstream release
Added: packages/requests/branches/0.12.1/debian/patches/03_fix_post_303_redirect_response_handling.patch
===================================================================
--- packages/requests/branches/0.12.1/debian/patches/03_fix_post_303_redirect_response_handling.patch (rev 0)
+++ packages/requests/branches/0.12.1/debian/patches/03_fix_post_303_redirect_response_handling.patch 2013-02-19 03:36:25 UTC (rev 23522)
@@ -0,0 +1,36 @@
+Description: Fix POST 303 redirect resonse handling
+From: Yehuda Sadeh <yehuda at inktank.com>
+Origin: backport, https://github.com/kennethreitz/requests/commit/b07c1ebd859a32e1203c1d4ef27f1fb9e154e55e
+Bug: https://github.com/kennethreitz/requests/issues/1156
+Bug-Debian: http://bugs.debian.org/699844
+Last-Update: 2013-02-19
+
+--- a/requests/models.py
++++ b/requests/models.py
+@@ -222,7 +222,7 @@
+ if r.status_code in REDIRECT_STATI and not self.redirect:
+
+ while (('location' in r.headers) and
+- ((r.status_code is codes.see_other) or (self.allow_redirects))):
++ ((r.status_code == codes.see_other) or (self.allow_redirects))):
+
+ r.content # Consume socket so it can be released
+
+@@ -252,7 +252,7 @@
+ requote_uri(url))
+
+ # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
+- if r.status_code is codes.see_other:
++ if r.status_code == codes.see_other:
+ method = 'GET'
+ data = None
+ files = None
+@@ -776,7 +776,7 @@
+ raise RuntimeError(
+ 'The content for this response was already consumed')
+
+- if self.status_code is 0:
++ if self.status_code == 0:
+ self._content = None
+ else:
+ self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
Modified: packages/requests/branches/0.12.1/debian/patches/series
===================================================================
--- packages/requests/branches/0.12.1/debian/patches/series 2013-02-19 02:09:11 UTC (rev 23521)
+++ packages/requests/branches/0.12.1/debian/patches/series 2013-02-19 03:36:25 UTC (rev 23522)
@@ -1,2 +1,3 @@
01_do-not-use-python-certifi.patch
02_do-not-use-embedded-python-six.patch
+03_fix_post_303_redirect_response_handling.patch
More information about the Python-modules-commits
mailing list