diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/cgi_ext/cgi_methods.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb b/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb index f19e70839d..941646c530 100755 --- a/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb +++ b/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb @@ -63,11 +63,12 @@ class CGIMethods #:nodoc: when Proc strategy.call(raw_post_data) when :xml_simple - typecast_xml_value(XmlSimple.xml_in(raw_post_data, - 'forcearray' => false, - 'forcecontent' => true, - 'keeproot' => true, - 'contentkey' => '__content__')) + raw_post_data.blank? ? nil : + typecast_xml_value(XmlSimple.xml_in(raw_post_data, + 'forcearray' => false, + 'forcecontent' => true, + 'keeproot' => true, + 'contentkey' => '__content__')) when :yaml YAML.load(raw_post_data) when :xml_node |