summaryrefslogtreecommitdiff
path: root/python3/httplib2
diff options
context:
space:
mode:
authorJoe Gregorio <jcgregorio@google.com>2011-02-13 21:40:09 -0500
committerJoe Gregorio <jcgregorio@google.com>2011-02-13 21:40:09 -0500
commit694a812923f5e29ca3d8ef1e2eae5c5262b64dd7 (patch)
tree2496bc7415519aa3c4fb8873bed42c69d509b6f2 /python3/httplib2
parentd1137c5b87562b5b089997cc1ad6a1422d331097 (diff)
downloadhttplib2-694a812923f5e29ca3d8ef1e2eae5c5262b64dd7.tar.gz
Fixes issue 123.
Diffstat (limited to 'python3/httplib2')
-rw-r--r--python3/httplib2/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py
index 1f7096d..3907013 100644
--- a/python3/httplib2/__init__.py
+++ b/python3/httplib2/__init__.py
@@ -967,7 +967,9 @@ the same interface as FileCache."""
old_response = copy.deepcopy(response)
if 'content-location' not in old_response:
old_response['content-location'] = absolute_uri
- redirect_method = ((response.status == 303) and (method not in ["GET", "HEAD"])) and "GET" or method
+ redirect_method = method
+ if response.status == 303:
+ redirect_method = "GET"
(response, content) = self.request(location, redirect_method, body=body, headers = headers, redirections = redirections - 1)
response.previous = old_response
else: