Send identity_headers through the wire
Change I09f70eee3e2777f52ce040296015d41649c2586a, introduced a bug where the identity_headers are not added to the request headers anymore causing the former to be completely ignored and useless. This patch fixes that issue by restoring the previous code. A new test has been added to avoid regressions. Closes-bug: #1394965 Change-Id: I1b1633636448398cf3f41217f1d671b43ebd9946
This commit is contained in:
committed by
Flavio Percoco
parent
3b6754a8cc
commit
5080d10099
@@ -157,6 +157,10 @@ class HTTPClient(object):
|
||||
headers = kwargs.pop("headers", {})
|
||||
headers = headers and copy.deepcopy(headers) or {}
|
||||
|
||||
if self.identity_headers:
|
||||
for k, v in six.iteritems(self.identity_headers):
|
||||
headers.setdefault(k, v)
|
||||
|
||||
# Default Content-Type is octet-stream
|
||||
content_type = headers.get('Content-Type', 'application/octet-stream')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user