From f00b6fa5883c0abe7bce804c783736ba96a4111a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 8 Sep 2021 15:25:27 +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 --- http-server/Service/Http.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http-server/Service/Http.php b/http-server/Service/Http.php index bc2c45e0..2fcd127b 100644 --- a/http-server/Service/Http.php +++ b/http-server/Service/Http.php @@ -9,6 +9,7 @@ use Http\Route\Node; use Kiri\Core\Help; use Server\Events\OnAfterRequest; use Server\Message\Response as MsgResponse; +use Server\RequestInterface; use Server\ResponseInterface; use Server\SInterface\OnClose; use Server\SInterface\OnConnect; @@ -41,8 +42,8 @@ class Http extends \Server\Abstracts\Http implements OnClose, OnConnect public function onRequest(Request $request, Response $response): void { try { - /** @var \Server\RequestInterface $request */ [$request, $psr7Response] = \Server\Constrict\Request::create($request); + /** @var RequestInterface $request */ $node = $this->router->Branch_search($request); if (!($node instanceof Node)) { throw new RequestException('

HTTP 404 Not Found


Powered by Swoole', 404);