From 1e1f9e51eee4e43c2a5e91535ccb6ab36c121dd0 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 26 Aug 2015 23:39:39 +0200 Subject: [PATCH] Use path info for routing --- src/Http/RouterMiddleware.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/RouterMiddleware.php b/src/Http/RouterMiddleware.php index 1bb27c8dc..92506209b 100644 --- a/src/Http/RouterMiddleware.php +++ b/src/Http/RouterMiddleware.php @@ -49,8 +49,9 @@ class RouterMiddleware */ public function __invoke(Request $request, Response $response, callable $out = null) { + $serverParams = $request->getServerParams(); + $uri = array_get($serverParams, 'PATH_INFO', $request->getUri()->getPath()) ?: '/'; $method = $request->getMethod(); - $uri = $request->getUri()->getPath() ?: '/'; $routeInfo = $this->getDispatcher()->dispatch($method, $uri);