Parameter Parsing with Duplicate Parameters

MacProBob
2006-08-24T05:57:49Z

Wondering if this should be the correct behavoir of parameter parsing
in Rails.

GET /controller/action?key=value1&key=value2

puts params[''key'']  # = value1

Currently, if you pass in multiple values with the same key, the FIRST
value is the value that is used and available in params. I think this
goes against PoLS in that keys defined later in html or on the query
string should override any previously defined values for that key. I''m
not referring to the ability to create an array using the [] syntax.

There is no written specification for how to parse incoming data, but
it seems logical that you would want the values defined later to be the
values you retrieve from your framework. (Most other web technologies
follow this behavoir as well, PHP, Django, all the Java crap etc..)

Opinions on this behavoir? I can do up a patch to enable it, not sure
what BC effects this would cause since you can''t really rely on this
behavoir right now anyways.

Bob Silva