From 18913c06918771c5f61fcdf2a5a36faa23e72635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 27 Apr 2021 18:09:09 +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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HttpServer/Events/OnRequest.php b/HttpServer/Events/OnRequest.php index 20e30875..0717f0a8 100644 --- a/HttpServer/Events/OnRequest.php +++ b/HttpServer/Events/OnRequest.php @@ -51,7 +51,8 @@ class OnRequest extends Callback public function onHandler(Request $request, Response $response): mixed { try { - + $response->setStatusCode(200); + return $response->end(''); Coroutine::defer(function () { fire(Event::SYSTEM_RESOURCE_RELEASES); @@ -75,6 +76,7 @@ class OnRequest extends Callback * @param $request * @param $response * @return array + * @throws Exception */ public static function createContext($request, $response): array {