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()