projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7344a0
)
Issue #996 Location should not be followed unless 30X response.
author
Jamshid Afshar
<jamshid@io.com>
Wed, 12 Dec 2012 00:14:13 +0000
(18:14 -0600)
committer
Jamshid Afshar
<jamshid@io.com>
Wed, 12 Dec 2012 00:14:13 +0000
(18:14 -0600)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
10c8587
..
9c768b5
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-233,7
+233,7
@@
class Request(object):
if r.status_code in REDIRECT_STATI and not self.redirect:
- while (('location' in r.headers) and
+ while (('location' in r.headers
and r.status_code in REDIRECT_STATI
) and
((r.status_code is codes.see_other) or (self.allow_redirects))):
r.content # Consume socket so it can be released