From 59e76733de250ca6754214b91ffa5b7b175a6664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Tue, 11 Feb 2014 00:49:30 +0100 Subject: [PATCH] Lowercase all thrift headers for compatibility with http --- elasticsearch/connection/thrift.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elasticsearch/connection/thrift.py b/elasticsearch/connection/thrift.py index 10c616e4..bb495719 100644 --- a/elasticsearch/connection/thrift.py +++ b/elasticsearch/connection/thrift.py @@ -75,5 +75,8 @@ class ThriftConnection(PoolingConnection): self.log_request_success(method, url, url, body, response.status, response.body, duration) - return response.status, response.headers or {}, response.body + headers = {} + if response.headers: + headers = dict((k.lower(), v) for k, v in response.headers.items()) + return response.status, headers, response.body