Ensure that identity token in header is not an unicode string
We need all the headers to be safe strings so they can be joined together and not become an unicode string in doing so. This fixes a bug when creating an image with non-ascii characters in the name. This is required for python 2.6 compatibility. Change-Id: I66ebc27edf4ccd8f903399da58705711c372536d Closes-Bug: 1448080
This commit is contained in:
@@ -135,7 +135,8 @@ class HTTPClient(_BaseHTTPClient):
|
||||
self.session.headers["User-Agent"] = USER_AGENT
|
||||
|
||||
if self.auth_token:
|
||||
self.session.headers["X-Auth-Token"] = self.auth_token
|
||||
self.session.headers["X-Auth-Token"] = encodeutils.safe_encode(
|
||||
self.auth_token)
|
||||
|
||||
if self.language_header:
|
||||
self.session.headers["Accept-Language"] = self.language_header
|
||||
|
||||
Reference in New Issue
Block a user