lib/elasticsearch/transport/transport/http/curb.rb in elasticsearch-transport-2.0.2 vs lib/elasticsearch/transport/transport/http/curb.rb in elasticsearch-transport-5.0.0.pre

- old
+ new

@@ -26,15 +26,15 @@ else raise ArgumentError, "Unsupported HTTP method: #{method}" end connection.connection.http(method.to_sym) - headers = {} - headers['content-type'] = 'application/json' if connection.connection.header_str =~ /\/json/ + response_headers = {} + response_headers['content-type'] = 'application/json' if connection.connection.header_str =~ /\/json/ Response.new connection.connection.response_code, connection.connection.body_str, - headers + response_headers end end # Builds and returns a connection #