This commit is contained in:
2021-07-09 13:41:06 +08:00
parent c095b69f67
commit 01f8e16b38
+1 -3
View File
@@ -8,9 +8,7 @@ use Exception;
use HttpServer\Abstracts\HttpService;
use HttpServer\Controller;
use HttpServer\Exception\RequestException;
use HttpServer\Http\Context;
use HttpServer\Http\Request;
use HttpServer\Http\Response;
use HttpServer\IInterface\Middleware;
use HttpServer\IInterface\RouterInterface;
use JetBrains\PhpStorm\Pure;
@@ -506,7 +504,7 @@ class Router extends HttpService implements RouterInterface
{
$node = $this->find_path(\request());
if (!($node instanceof Node)) {
throw new RequestException(self::NOT_FOUND, 404);
throw new RequestException(\request()->getUri() . ' -> ' . self::NOT_FOUND, 404);
}
send(($response = $node->dispatch()), 200);
if (!$node->hasAfter()) {