Merge "Fix getting header in redirect processing"

This commit is contained in:
Jenkins
2013-10-09 17:36:54 +00:00
committed by Gerrit Code Review
2 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -233,7 +233,8 @@ class HTTPClient(object):
raise exc.from_response(resp, body_str)
elif resp.status in (301, 302, 305):
# Redirected. Reissue the request to the new location.
return self._http_request(resp['location'], method, **kwargs)
return self._http_request(resp.getheader('location', None), method,
**kwargs)
elif resp.status == 300:
raise exc.from_response(resp)