From 16b9a554db7e1bf3f5f224cdc5b4d27480e053ff Mon Sep 17 00:00:00 2001 From: Rasik Pandey Date: Sat, 30 Aug 2008 04:19:18 +0300 Subject: Format related patches to support serializing data out in the correct format with correct http request headers per http method type [#450 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tarmo Tänav Signed-off-by: Jeremy Kemper --- activeresource/lib/active_resource/http_mock.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activeresource/lib/active_resource/http_mock.rb') diff --git a/activeresource/lib/active_resource/http_mock.rb b/activeresource/lib/active_resource/http_mock.rb index 554fc3bcfc..9ed532b48c 100644 --- a/activeresource/lib/active_resource/http_mock.rb +++ b/activeresource/lib/active_resource/http_mock.rb @@ -146,7 +146,7 @@ module ActiveResource attr_accessor :path, :method, :body, :headers def initialize(method, path, body = nil, headers = {}) - @method, @path, @body, @headers = method, path, body, headers.reverse_merge('Content-Type' => 'application/xml') + @method, @path, @body, @headers = method, path, body, headers.merge(ActiveResource::Connection::HTTP_FORMAT_HEADER_NAMES[method] => 'application/xml') end def ==(other_request) -- cgit v1.2.3