From 60d72ec44988c7ecda4d7d4706be942fea4a1bca Mon Sep 17 00:00:00 2001 From: Joe Gregorio Date: Mon, 13 Jun 2011 13:31:25 -0400 Subject: Redirect with a GET on 302 regardless of the originating method. Fixes issue 139. --- python2/httplib2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python2') diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py index 39d817f..5808c24 100644 --- a/python2/httplib2/__init__.py +++ b/python2/httplib2/__init__.py @@ -1230,7 +1230,7 @@ and more. if not old_response.has_key('content-location'): old_response['content-location'] = absolute_uri redirect_method = method - if response.status == 303: + if response.status in [302, 303]: redirect_method = "GET" (response, content) = self.request(location, redirect_method, body=body, headers = headers, redirections = redirections - 1) response.previous = old_response -- cgit v1.2.1