From c5c716f6e5ac32ad7dded1a4633808996a4e67a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 7 Sep 2020 17:39:51 +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 | 3 +++ HttpServer/Server.php | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 666f2987..9d08d0ae 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -439,6 +439,9 @@ class Router extends Application implements RouterInterface } $methods = $this->nodes[$method]; $uri = ltrim($request->headers->getHeader('request_uri'), '/'); + if (empty($uri)) { + $uri = '/'; + } if (!isset($methods[$uri])) { if ($request->isOption) { return $this->search_options($request); diff --git a/HttpServer/Server.php b/HttpServer/Server.php index 2444fdfb..c899b71b 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -170,9 +170,7 @@ class Server extends Application /** - * @throws ReflectionException * @throws ConfigException - * @throws NotFindClassException * @throws Exception */ public function onProcessListener()