改名
This commit is contained in:
@@ -103,13 +103,12 @@ class HTTPServerListener extends Abstracts\Server
|
|||||||
{
|
{
|
||||||
[$sRequest, $sResponse] = [HRequest::create($request), HResponse::create($response)];
|
[$sRequest, $sResponse] = [HRequest::create($request), HResponse::create($response)];
|
||||||
try {
|
try {
|
||||||
if ($sRequest->is('favicon.ico')) {
|
$node = $this->router->find_path($sRequest);
|
||||||
$this->router->status404();
|
if (empty($node)) {
|
||||||
} else if (!($node = $this->router->find_path($sRequest))) {
|
$sResponse->send('404', 404);
|
||||||
$this->router->status404();
|
return;
|
||||||
} else {
|
|
||||||
$sResponse->send($node->dispatch(), 200);
|
|
||||||
}
|
}
|
||||||
|
$sResponse->send($node->dispatch(), 200);
|
||||||
} catch (Error | Throwable $exception) {
|
} catch (Error | Throwable $exception) {
|
||||||
$sResponse->addHeader('Content-Type', 'text/html; charset=utf-8');
|
$sResponse->addHeader('Content-Type', 'text/html; charset=utf-8');
|
||||||
$sResponse->send(jTraceEx($exception, null, true),
|
$sResponse->send(jTraceEx($exception, null, true),
|
||||||
|
|||||||
Reference in New Issue
Block a user