Skip to content
Snippets Groups Projects
Commit 2ec315b5 authored by Tim van Dijen's avatar Tim van Dijen Committed by Jaime Pérez Crespo
Browse files

Standardize the way we collect PATH_INFO (#1228)

Closes #1227
parent 33da694f
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ class Module
$request = Request::createFromGlobals();
}
if ($request->getPathInfo() === '/') {
if ($request->server->get('PATH_INFO') === '/') {
throw new Error\NotFound('No PATH_INFO to module.php');
}
......@@ -566,7 +566,7 @@ class Module
*/
public static function removeTrailingSlash(Request $request)
{
$pathInfo = $request->getPathInfo();
$pathInfo = $request->server->get('PATH_INFO');
$url = str_replace($pathInfo, rtrim($pathInfo, ' /'), $request->getRequestUri());
return new RedirectResponse($url, 308);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment