Fix Client for Requests Update

* Requests will no longer accept anything
  except a string as header values. This
  fix will make sure every header value is a
  string.

Change-Id: Ice86b69658a79d44229defb8796b9fc0d055f58e
This commit is contained in:
josh7810 2016-08-10 16:08:29 -05:00
parent ecc94171fb
commit 124c0923f7
1 changed files with 3 additions and 0 deletions

View File

@ -187,6 +187,9 @@ class ObjectStorageAPIClient(HTTPClient):
# If headers are provided by both, headers "wins" over default_headers
headers = dict(self.default_headers, **(headers or {}))
for header in headers:
if not isinstance(headers[header], str):
headers[header] = str(headers[header])
# Override url if present in requestslib_kwargs
if 'url' in requestslib_kwargs.keys():