Changeset 3936
- Timestamp:
- 03/18/06 18:56:19 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb
r3915 r3936 64 64 strategy.call(raw_post_data) 65 65 when :xml_simple 66 typecast_xml_value(XmlSimple.xml_in(raw_post_data, 67 'forcearray' => false, 68 'forcecontent' => true, 69 'keeproot' => true, 70 'contentkey' => '__content__')) 66 raw_post_data.blank? ? nil : 67 typecast_xml_value(XmlSimple.xml_in(raw_post_data, 68 'forcearray' => false, 69 'forcecontent' => true, 70 'keeproot' => true, 71 'contentkey' => '__content__')) 71 72 when :yaml 72 73 YAML.load(raw_post_data) trunk/actionpack/test/controller/webservice_test.rb
r3918 r3936 92 92 assert_equal 'content...', @controller.params["summary"] 93 93 assert_equal 'SimpleXml', @controller.params["title"] 94 end 95 96 def test_use_xml_ximple_with_empty_request 97 ActionController::Base.param_parsers[Mime::XML] = :xml_simple 98 assert_nothing_raised { process('POST', 'application/xml', "") } 99 assert_equal "", @controller.response.body 94 100 end 95 101