Merge pull request #1311 from sigmavirus24/fix1303

Change the method when it isn't already GET/HEAD
This commit is contained in:
Kenneth Reitz
2013-04-13 12:02:29 -07:00
+1 -1
View File
@@ -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