urldecode REQUEST_URI when doing custom routing, fixes #919
This commit is contained in:
parent
8fb6fd5f54
commit
c5273c4b05
2 changed files with 2 additions and 4 deletions
|
@ -9,4 +9,4 @@ exec gosu shimmie:shimmie \
|
|||
-d upload_max_filesize=$UPLOAD_MAX_FILESIZE \
|
||||
-d post_max_size=$UPLOAD_MAX_FILESIZE \
|
||||
-S 0.0.0.0:8000 \
|
||||
tests/router.php | grep --line-buffered -v " (Accepted|Closing)"
|
||||
tests/router.php 2>&1 | grep --line-buffered -vE " (Accepted|Closing)"
|
||||
|
|
|
@ -31,8 +31,6 @@ else {
|
|||
// website subdirectory we're installed in - if we're using router.php, then
|
||||
// let's blindly assume that we're in the root directory.
|
||||
$_SERVER["PHP_SELF"] = "/index.php";
|
||||
$_GET['q'] = explode("?", $_SERVER["REQUEST_URI"])[0];
|
||||
// if we use a custom handler, we need to do our own access log
|
||||
error_log("{$_SERVER['REMOTE_ADDR']}:{$_SERVER['REMOTE_PORT']} [???]: {$_GET['q']}");
|
||||
$_GET['q'] = urldecode(explode("?", $_SERVER["REQUEST_URI"])[0]);
|
||||
require_once "index.php";
|
||||
}
|
||||
|
|
Reference in a new issue