Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Parsing post xml requests with no root node

#1508

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]

Reported by Paul Mason · December 3rd, 2008 @ 12:49 AM

State: invalid
Milestone: 2.x
Assigned to: josh josh
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to invalid
    • Assigned user set to josh

    Is this still a problem ? Could you please submit a failing test ? http://guides.rails.info/contrib...

    Thanks.

    March 13th, 2009 @ 11:13 AM