From 8eb8bc8b2a278c4fa63a71d2ad32ec4ca6c615a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 27 Apr 2021 18:16:03 +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/Events/OnRequest.php | 1 - HttpServer/Http/Request.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index 3686e90c..b1346366 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -57,7 +57,6 @@ class OnRequest extends Callback /** @var HResponse $response */ [$request, $response] = OnRequest::createContext($request, $response); - return \response()->send('ok', 200); if ($request->is('favicon.ico')) { return $response->close(404); } diff --git a/HttpServer/Http/Request.php b/HttpServer/Http/Request.php index 15dca956..219a1611 100644 --- a/HttpServer/Http/Request.php +++ b/HttpServer/Http/Request.php @@ -439,7 +439,7 @@ class Request extends HttpService */ public function is($router): bool { - return $this->getUri() == trim($router, '/'); + return $this->getUri() == $router; } /**