Params => hashes fscked after 4821. test case included.

See ticket:
And changeset:

Why did david change request_parameters to use the method that
-doesn't- do implicit hash construction?

From comments in cgi_methods.rb:

    # Returns a hash with the pairs from the query string. The
implicit hash construction that is done in
    # parse_request_params is not done here.
    def parse_query_parameters(query_string)

This fits in cgi_test.rb:

  def test_parse_params_with_nested_attributes
    input = "user%5Blogin%5D=my_username&user%5Bpassword%5D=apassword"
    expected = {:user => {:login => 'my_username', :password => 'apassword'}}
    assert_equal expected, CGIMethods.parse_query_parameters(input)

And fails wonderously.

  1) Failure:
<{:user=>{:login=>"my_username", :password=>"apassword"}}> expected but was
<{"user[login]"=>"my_username", "user[password]"=>"apassword"}>.

I've been plowing on instead
looks like this new dandy QSS thing does not know that brackets might be escaped.

And exactly because it's so fancy I couldn't understand how to fix it properly (regexes all over the place just use the brackets verbatim in classes).

Got no idea why this parser solution hs been introduced in the first place, by the way.

Responding to David (Akismet on the trac blocks anything I throw at him) - the zip file has the test case and a quick&dirty fix. Both Safari and FF send brackets encoded in POST.

Hey folks,
the same thing is happening after changelist: 4866, but with a catch.

Under OSX running lighttpd or mongrel, this changelist works fine.
However, at a shared hosting service that is using Linux (CentOS) and
Apache -> Mongrel, the param hash is not being nested.

On my Mac, I see this for a request submitted from a form:

Processing BetasController#create (for at 2006-08-29
06:12:34) [POST] Session ID: cb79f9c96d7ab3d8fee60f6cd8884f5d
Parameters: {"commit"=>"Signup", "action"=>"create",
"beta"=>{"email"=>""}, "controller"=>"betas"}

but on the hosting service I see (notice how beta[email] is not

Processing BetasController#create (for at 2006-08-29
10:22:33) [POST] Session ID: a2ea5dd42d35f0966608dc9be7fc3b39
Parameters: {"commit"=>"Signup", "beta[email]"=>"",
"action"=>"create", "controller"=>"betas"}

Unfortunatly I can't track it down for about 2 weeks as I need the
hosted app to be stable. But I did want to let people know.

Adam Greene