From 879e347e3b2934f473622b684068dbd419f0f3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 17 Oct 2023 20:13:29 +0800 Subject: [PATCH] eee --- Handler/OnRequest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Handler/OnRequest.php b/Handler/OnRequest.php index 031c52a..558857d 100644 --- a/Handler/OnRequest.php +++ b/Handler/OnRequest.php @@ -97,9 +97,10 @@ class OnRequest implements OnRequestInterface try { /** @var ConstrictRequest $PsrRequest */ $PsrRequest = $this->initPsr7RequestAndPsr7Response($request); + $dispatcher = $this->router->query($request->server['path_info'], $request->getMethod()); - $PsrResponse = (new HttpRequestHandler($dispatcher->getMiddlewares(), $dispatcher))->handle($PsrRequest); + $PsrResponse = $dispatcher->run($PsrRequest); } catch (\Throwable $throwable) { $PsrResponse = $this->exception->emit($throwable, di(ConstrictResponse::class)); } finally {