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:
eda4b55
)
Change the method when it isn't already GET/HEAD
author
Ian Cordasco
<graffatcolmingov@gmail.com>
Sat, 13 Apr 2013 16:30:05 +0000
(12:30 -0400)
committer
Ian Cordasco
<graffatcolmingov@gmail.com>
Sat, 13 Apr 2013 16:31:22 +0000
(12:31 -0400)
For some reason it was only change the method when a POST was being made. This
is almost certainly my fault.
Fixes #1303
requests/sessions.py
patch
|
blob
|
history
diff --git
a/requests/sessions.py
b/requests/sessions.py
index eb6b1eb61630012244557fa539d76bd9cc85f1ac..27ca18fc49c7b1481c47fbb21f1dddfeccd88824 100644
(file)
--- a/
requests/sessions.py
+++ b/
requests/sessions.py
@@
-125,7
+125,7
@@
class SessionRedirectMixin(object):
# Do what the browsers do, despite standards...
if (resp.status_code in (codes.moved, codes.found) and
- prepared_request.method
== 'POST'
):
+ prepared_request.method
not in ('GET', 'HEAD')
):
method = 'GET'
prepared_request.method = method