lib/excon/response.rb in excon-0.39.3 vs lib/excon/response.rb in excon-0.39.4
- old
+ new
@@ -157,12 +157,13 @@
end
end
def initialize(params={})
@data = {
- :body => '',
- :headers => Excon::Headers.new
+ :body => ''
}.merge(params)
+ @data[:headers] = Excon::Headers.new.merge!(params[:headers] || {})
+
@body = @data[:body]
@headers = @data[:headers]
@status = @data[:status]
@remote_ip = @data[:remote_ip]
@local_port = @data[:local_port]