laravel/framework — pull request #3521 by sirbarrence (2014-02-11 22:42:49+00:00)
Title: exception displayers should not ignore custom headers

When attempting to send headers to an `App::abort()` the correct status is set in the response, but the headers are not. For example:

App::abort(401, '', array('X-Some-Custom-Header' => 'Bazinga'));

This results in the proper `HTTP/1.1 401 Unauthorized` response, and automatic headers like `X-Frame-Options` and `Set-Cookie` are set. However the custom headers provided to `App::abort()` are ignored.

The problem seems to be in `Illuminate\Exception\WhoopsDisplayer` (when in debug mode) and `Illuminate\Exception\PlainDisplayer` (when not in debug mode). They are correctly reading the status code from the `HttpException` and setting it in the response, but they are not doing so for the `HttpException`'s headers.