This commit is contained in:
2023-10-17 17:18:55 +08:00
parent f4752062bd
commit 65d1585722
+1 -3
View File
@@ -99,9 +99,7 @@ class OnRequest implements OnRequestInterface
$PsrRequest = $this->initPsr7RequestAndPsr7Response($request);
$dispatcher = $this->router->query($request->server['path_info'], $request->getMethod());
$middleware = $this->middlewareManager->get($dispatcher->getClass(), $dispatcher->getMethod());
$PsrResponse = (new HttpRequestHandler($middleware, $dispatcher))->handle($PsrRequest);
$PsrResponse = (new HttpRequestHandler($dispatcher->getMiddlewares(), $dispatcher))->handle($PsrRequest);
} catch (\Throwable $throwable) {
$PsrResponse = $this->exception->emit($throwable, di(ConstrictResponse::class));
} finally {