This project is archived and is in readonly mode.

#3803 ✓resolved

Bug in Chromium with GET parameters when doing a POST request

Reported by Damien MATHIEU | January 28th, 2010 @ 08:54 AM | in 3.0.2

With jQuery, I do some ajax requests in POST. As of now, some parameters were given in GET (that's not good. But that was historical).
So I made the request with the following :

    url: '/my/url?param=test',
    type: 'post'

In Firefox 3.5, this call works well. But in Chromium, rails raises an exception when trying to parse the parameters.

Error occurred while parsing request parameters.

/!\ FAILSAFE /!\  28/01/2010 09:47:38
  Status: 500 Internal Server Error
  undefined method `name' for nil:NilClass
    /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb:52:in `method_missing'
    /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini/rexml.rb:29:in `merge_element!'
    /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini/rexml.rb:18:in `parse'
    /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini.rb:12:in `__send__'
    /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini.rb:12:in `parse'
    /usr/lib64/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/conversions.rb:164:in `from_xml'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:34:in `parse_formatted_parameters'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:11:in `call'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call'
    /usr/lib64/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call'

This bug can be corrected by not passing the parameters in GET anymore.

    url: '/my/url',
    type: 'post',
    data: {
        param: 'test'

I don't really know yet if this must be corrected in Chromium, jQuery or rails.

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=""></a>

Referenced by