X-Auth-Token should be a bytestring.

Change-Id: I2aa941d74883e17e9548b0144a4a2e2db33aba95
Closes-Bug: 1451773
This commit is contained in:
Emmanuel Cazenave 2015-05-05 12:31:22 +02:00 committed by Alistair Coles
parent 51565ab2fd
commit 1faad248f8

View File

@ -181,7 +181,11 @@ class Connection(object):
self.storage_url = str('/%s/%s' % (x[3], x[4])) self.storage_url = str('/%s/%s' % (x[3], x[4]))
self.account_name = str(x[4]) self.account_name = str(x[4])
self.auth_user = auth_user self.auth_user = auth_user
self.storage_token = storage_token # With v2 keystone, storage_token is unicode.
# We want it to be string otherwise this would cause
# troubles when doing query with already encoded
# non ascii characters in its headers.
self.storage_token = str(storage_token)
self.user_acl = '%s:%s' % (self.account, self.username) self.user_acl = '%s:%s' % (self.account, self.username)
self.http_connect() self.http_connect()