playframework/playframework — pull request #1939 by reid-spencer (2013-10-29 03:20:07+00:00)
Title: Make FormUrlEncoded Data Preserve Parameter Order. Fixes #1814

* Write play.utils.OrderPreserving.groupBy to abstractly do groupBy while preserving order
* Created a separate module because there might be a need for other OrderPreserving things later.
* Utilize OrderPreserving.groupBy in FormUrlEncodedParser.scala so that it can return ListMap instead of Map
* Adjust ContentTypes, Fakes, and JavaParsers to use ListMap instead of Map for FormUrlEncoded bodies
* Write new test case for validating FormFieldOrder being received correctly out of the pipeline
* Extend test case for FormUrlEncodedParser to ensure it maintains parameter order.

I previously submitted this under pull request #1910 which is now closed. This is the replacement pull request .. just botched some commits on my end, all fixed now. This commit incorporates all previous commits including fixes James Roper requested in #1910