Skip to content
Myr

Merge pull request #1311 from sigmavirus24/fix1303

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Change the method when it isn't already GET/HEAD

authored by Kenneth Reitz · committed by Kenneth Reitz · parents eda4b55, c5d0a09 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:requests/sessions.py+1 added-1 removed
123 unmodified lines
124 method = 'GET'125126 # Do what the browsers do, despite standards...127 if (resp.status_code in (codes.moved, codes.found) and128 prepared_request.method == 'POST'):128 prepared_request.method not in ('GET', 'HEAD')):129 method = 'GET'130131 prepared_request.method = method132
373 unmodified lines