symfony/symfony — pull request #5884 by glsee (2012-11-01 07:27:44+00:00)
Title: Ensure the header names match the header values

In Silex, when an existing header is replaced in $app->after() callback, the order of header names and values become not corresponding to each other, which in turn causes the response headers to get messed up.

Ordering the header names and values according to their keys before combining and returning them can ensure the order of header names and that of values match each other correctly.