mirror of
https://github.com/filp/whoops.git
synced 2026-09-15 20:26:44 +00:00
JsonResponseHandler: send the content type, close #90
This commit is contained in:
@@ -103,6 +103,10 @@ class JsonResponseHandler extends Handler
|
||||
$response['error']['trace'] = $frameData;
|
||||
}
|
||||
|
||||
if (\Whoops\Util\Misc::canSendHeaders()) {
|
||||
header('Content-Type: application/json');
|
||||
}
|
||||
|
||||
echo json_encode($response);
|
||||
return Handler::QUIT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user