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. --- python3/httplib2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python3/httplib2/__init__.py') diff --git a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py index c5ab677..99353b2 100644 --- a/python3/httplib2/__init__.py +++ b/python3/httplib2/__init__.py @@ -973,7 +973,7 @@ the same interface as FileCache.""" if 'content-location' not in old_response: 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