rack/rack — Issue #355: Providing a way to obtain parsed form data in an ordered and unalterated representation.
Author: tizoc
Created: 2012-03-05 16:30:16+00:00
State: open

http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4

application/x-www-form-urlencoded

The control names/values are listed in the order they appear in the document. The name is separated from the value by `=' and name/value pairs are separated from each other by `&'.

multipart/form-data

A "multipart/form-data" message contains a series of parts, each representing a successful control. The parts are sent to the processing agent in the same order the corresponding controls appear in the document stream. Part boundaries should not occur in any of the data; how this is done lies outside the scope of this specification.

When parsing such data, Rack returns a Hash, with values of the same name merged (unless they end with '[]', in such case an array is constructed).

I propose an alternative method that returns an array of [{name => value}, ...] instead of a Hash.

Thoughts?