mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
Improve request URI determination.
This commit is contained in:
parent
d380992aa7
commit
0db0dadef7
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user