Closed
Description
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:
- practically there already exists a solution without this magic header: http://stackoverflow.com/a/26520225/1382727
- 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.