JsonResponseHandler: send the content type, close #90

This commit is contained in:
Denis Sokolov
2014-02-16 14:13:48 +01:00
parent d46c3782c0
commit c22d92d1db
@@ -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;
}