Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Kernel] deprecate X-Status-Code #12343

Copy link
Copy link
Closed
@Tobion

Description

@Tobion
Issue body actions

The handling of the X-Status-Code header in der kernel introduced in 788e5eb is a hack and just introduced as a workaround. First of all it's magic (why this header?) and second of all it disallows to actually return such a header because it's removed automatically. So you cannot send a response with this header even if you need to.
It should be deprecated and replaced by a better solution. Alternatives:

  1. practically there already exists a solution without this magic header: http://stackoverflow.com/a/26520225/1382727
  2. or better add a GetResponseForExceptionEvent::allowSuccessfulResponse setter/getter to the event. When true (default false), it will use the Response status code even if it's a 2xx for an exception.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.