From c1c4f6c928d05b66159b73bbe3c0300c55ccdafc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 3 Aug 2021 12:38:30 +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, 2 insertions(+), 2 deletions(-) diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index ec3de876..b2e5f10f 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -120,7 +120,7 @@ class Router extends HttpService implements RouterInterface if ($handler instanceof Closure) { $handler = Closure::bind($handler, di(Controller::class)); } - return $this->tree($path, $handler, $method); + return $this->hash($path, $handler, $method); } @@ -515,7 +515,7 @@ class Router extends HttpService implements RouterInterface */ public function dispatch(Request $request): void { - $node = $this->Branch_search($request); + $node = $this->find_path($request); if (!($node instanceof Node)) { $this->response->setFormat(Response::HTML); $this->response->send('

404

');