Skip to content

[2.2] Default _format should be aware of HTTP Accept header #4567

Closed
@OleMchls

Description

@OleMchls

The symfony default _format which is used to determine the right template should be aware of the HTTP Accept header(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)

This shouldn't effect the default behavior like it is right now for websites, but if you're building an (REST[FUL]) API this would be a really great improvement.

As far as I discovered it now, the format is determined here: [...]/symfony/src/Symfony/Component/HttpFoundation/Request.php:833

What do you think?

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