Commit 0db0dade authored by Taylor Otwell's avatar Taylor Otwell

Improve request URI determination.

parent d380992a
......@@ -36,7 +36,12 @@ class Request {
// -------------------------------------------------------
elseif (isset($_SERVER['REQUEST_URI']))
{
$uri = str_replace('/index.php', '', $_SERVER['REQUEST_URI']);
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
if ($uri === false)
{
throw new \Exception("Malformed request URI. Request terminated.");
}
}
// -------------------------------------------------------
// Neither PATH_INFO or REQUEST_URI are available.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment