mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Change the method when it isn't already GET/HEAD
For some reason it was only change the method when a POST was being made. This is almost certainly my fault. Fixes #1303
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