Skip to content

[HttpFoundation] Request::splitHttpAcceptHeader incorrect result order #5611

Closed
@kerihenare

Description

@kerihenare

splitHttpAcceptHeader ignores the order of Accept items. It correctly sorts by q-value but loses the given order for items with the same q-value. While the spec doesn't explicitly state that order should be considered for items with the same q-value, it is implied.

This issue exists in all versions of Symfony (including 1.x & 2.x). The related tests seem to be written to match the result rather than the other way around (No offence intended).

Here's my test: https://gist.github.com/3791883

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions