This commit is contained in:
2021-07-21 11:28:57 +08:00
parent 8f6079b040
commit 226094f844
2 changed files with 542 additions and 544 deletions
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -97,9 +97,8 @@ class HTTPServerListener extends Abstracts\Server
[$request, $response] = [HRequest::create($request), HResponse::create($response)];
if ($request->is('favicon.ico')) {
throw new Exception('Not found.', 404);
} else {
$this->router->dispatch();
}
$this->router->dispatch();
} catch (ExitException | Error | Throwable $exception) {
$response->status($exception->getCode() == 0 ? 500 : $exception->getCode());
$response->end($exception->getMessage());