Transport.perform_request mutate headers. (#694)

This commit is contained in:
Fabrice Bacchella
2018-01-01 15:54:09 +01:00
committed by Honza Král
parent a023bddb4d
commit 920218db83
+2 -2
View File
@@ -311,7 +311,7 @@ class Transport(object):
connection = self.get_connection()
try:
status, headers, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
except TransportError as e:
if method == 'HEAD' and e.status_code == 404:
@@ -342,7 +342,7 @@ class Transport(object):
return 200 <= status < 300
if data:
data = self.deserializer.loads(data, headers.get('content-type'))
data = self.deserializer.loads(data, headers_response.get('content-type'))
return data
def close(self):