This project is archived and is in readonly mode.

#1508 ✓invalid
Paul Mason

Parsing post xml requests with no root node

Reported by Paul Mason | December 3rd, 2008 @ 12:49 AM | in 2.x

When passing a post request using xml that has multiple root nodes, an error occurs in

actionpack-2.2.2\lib\action_controller\request.rb on line 513

In use, I am passing data from a flex app, using a content type of "application/xml", and post data of

loginvaluepasswordvalue

Because these values should be available as params[:login] and params[:value], I don't want to nest my data in another tag, so I am suggesting that line 513 of request.rb be changed:

  • body.blank? ? {} : Hash.from_xml(body).with_indifferent_access
  • body.blank? ? {} : (Hash.from_xml("#{body}").with_indifferent_access)[:root]

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages