From: Ian Cordasco Date: Sat, 13 Apr 2013 16:30:05 +0000 (-0400) Subject: Change the method when it isn't already GET/HEAD X-Git-Tag: v1.2.1~18^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5d0a0931e1a9b199ea286853fc4722d624d85ec;p=services%2Fpython-requests.git 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 --- 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