Merge "Remove glance.common.client._encode_headers"

This commit is contained in:
Zuul 2022-02-16 15:44:41 +00:00 committed by Gerrit Code Review
commit a23b5f44aa

View File

@ -399,19 +399,6 @@ class BaseClient(object):
LOG.debug(log_msg, url.geturl())
return url
def _encode_headers(self, headers):
"""
Encodes headers.
Note: This should be used right before
sending anything out.
:param headers: Headers to encode
:returns: Dictionary with encoded headers'
names and values
"""
return {str(h): str(v) for h, v in headers.items()}
@handle_redirects
def _do_request(self, method, url, body, headers):
"""
@ -442,7 +429,7 @@ class BaseClient(object):
try:
connection_type = self.get_connection_type()
headers = self._encode_headers(headers or {})
headers = headers or {}
headers.update(osprofiler.web.get_trace_id_headers())
if 'x-auth-token' not in headers and self.auth_token: