mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #1311 from sigmavirus24/fix1303
Change the method when it isn't already GET/HEAD
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user