summaryrefslogtreecommitdiff
path: root/python2
diff options
context:
space:
mode:
authorJoe Gregorio <jcgregorio@google.com>2011-06-13 13:31:25 -0400
committerJoe Gregorio <jcgregorio@google.com>2011-06-13 13:31:25 -0400
commit60d72ec44988c7ecda4d7d4706be942fea4a1bca (patch)
tree397e22eff317bf9f64e7ed70693dbbe38dc2582d /python2
parentdcc062fcb9c3eeac045471919b017e70a258e217 (diff)
downloadhttplib2-60d72ec44988c7ecda4d7d4706be942fea4a1bca.tar.gz
Redirect with a GET on 302 regardless of the originating method. Fixes issue 139.
Diffstat (limited to 'python2')
-rw-r--r--python2/httplib2/__init__.py2
1 files changed, 1 insertions, 1 deletions
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