From c5d0a0931e1a9b199ea286853fc4722d624d85ec Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Sat, 13 Apr 2013 12:30:05 -0400 Subject: [PATCH] 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 --- requests/sessions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/sessions.py b/requests/sessions.py index eb6b1eb..27ca18f 100644 --- 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 -- 2.34.1