Skip to content

Commit

Permalink
Transport.perform_request mutate headers. (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacchella authored and honzakral committed Jan 1, 2018
1 parent a023bdd commit 920218d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elasticsearch/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def perform_request(self, method, url, headers=None, params=None, body=None):
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:
Expand Down Expand Up @@ -342,7 +342,7 @@ def perform_request(self, method, url, headers=None, params=None, body=None):
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):
Expand Down

0 comments on commit 920218d

Please sign in to comment.