Skip to content

[Kernel] deprecate X-Status-Code #12343

Closed
@Tobion

Description

@Tobion

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