#69 ✓wontfix
Bruno Michel

Rack::Utils.parse_nested_query weirdness

Reported by Bruno Michel | August 6th, 2009 @ 10:22 AM


I found two cases where Rack::Utils.parse_nested_query returns weird results :


=> {"x"=>[{"y"=>{"w"=>"3"}, "z"=>"2"}, {"z"=>"4"}]}


=> {"x"=>[{"y"=>{"w"=>"3", "t"=>"4"}}]}

In particular, I'm perplex that some values are rejected. As I've not found which document specify how should query be parsed, I don't know if it's an expected result or a bug.

Comments and changes to this ticket

  • Arnaud Berthomier

    Arnaud Berthomier August 6th, 2009 @ 10:31 AM


    On the same topic...

        # => {"x"=>[{"y"=>{"w"=>"4"}}]}

    Only the last value is seen here ; shouldn't this be more like this ?

  • josh

    josh December 11th, 2009 @ 02:38 AM

    • Assigned user set to “josh”
    • State changed from “new” to “wontfix”

    The parser intentionally clobbers earlier parameters. In the simplest example "foo=bar&foo=baz" => {foo => baz}. In gets kind of weird with deeply nested params. In the those examples you have ambiguous types so the latter type clobbers the first instead of merging with it.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

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

People watching this ticket