summaryrefslogtreecommitdiff
path: root/keystoneclient/httpclient.py
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@redhat.com>2013-12-17 14:19:18 +1000
committerGerrit Code Review <review@openstack.org>2013-12-20 03:51:50 +0000
commit6728bf3ccbfb79dc53f581e0d7e9019626c97df0 (patch)
tree5cc8ca7ee79156219df4027cd88826984faaa1e8 /keystoneclient/httpclient.py
parenta8adb476f76688106b2ac30ad5eca55e8a5efd3c (diff)
downloadpython-keystoneclient-6728bf3ccbfb79dc53f581e0d7e9019626c97df0.tar.gz
Move redirect handling to session
Particularly 305 is expected to be handled by the tests so we need to handle this centrally if we want to have session and non-session clients to work the same way. Change-Id: Id4ec35ddd8b8304d24df9e6cd2ab995d123ef125
Diffstat (limited to 'keystoneclient/httpclient.py')
-rw-r--r--keystoneclient/httpclient.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py
index b1d03e5..fa2bbb4 100644
--- a/keystoneclient/httpclient.py
+++ b/keystoneclient/httpclient.py
@@ -545,17 +545,6 @@ class HTTPClient(object):
pass
resp = self.session.request(url, method, **kwargs)
-
- # NOTE(jamielennox): The requests lib will handle the majority of
- # redirections. Where it fails is when POSTs are redirected which
- # is apparently something handled differently by each browser which
- # requests forces us to do the most compliant way (which we don't want)
- # see: https://en.wikipedia.org/wiki/Post/Redirect/Get
- # Nova and other direct users don't do this. Is it still relevant?
- if resp.status_code in (301, 302, 305):
- # Redirected. Reissue the request to the new location.
- return self.request(resp.headers['location'], method, **kwargs)
-
return resp, self._decode_body(resp)
def _cs_request(self, url, method, **kwargs):