From cf0cae7c876a803013737e37c917ffc693af08cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 13 Aug 2021 15:32:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Router.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index f3fc4cde..53cfb25c 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -403,7 +403,6 @@ class Router extends HttpService implements RouterInterface * @param $method * @return Node|null * 查找指定路由 - * @throws RequestException */ public function tree_search(?array $explode, $method): ?Node { @@ -414,7 +413,7 @@ class Router extends HttpService implements RouterInterface while ($value = array_shift($explode)) { $node = $parent->findNode($value); if (!$node) { - throw new RequestException('

HTTP 404 Not Found


Powered by Swoole', 404); + return null; } $parent = $node; } @@ -534,7 +533,6 @@ class Router extends HttpService implements RouterInterface return $node; } if (!$request->isOption) { - var_dump($request); return null; } $node = $this->tree_search(['*'], $request->getMethod());