mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-05 23:17:00 -05:00
Compatibility ORIG_PATH_INFO (#3560)
#fix https://github.com/FreshRSS/FreshRSS/issues/3542
This commit is contained in:
committed by
GitHub
parent
d04166532a
commit
06fa514483
@@ -939,7 +939,16 @@ function markAllAsRead($streamId, $olderThanId) {
|
||||
exit('OK');
|
||||
}
|
||||
|
||||
$pathInfo = empty($_SERVER['PATH_INFO']) ? '' : urldecode($_SERVER['PATH_INFO']);
|
||||
$pathInfo = '';
|
||||
if (empty($_SERVER['PATH_INFO'])) {
|
||||
if (!empty($_SERVER['ORIG_PATH_INFO'])) {
|
||||
// Compatibility https://php.net/reserved.variables.server
|
||||
$pathInfo = $_SERVER['ORIG_PATH_INFO'];
|
||||
}
|
||||
} else {
|
||||
$pathInfo = $_SERVER['PATH_INFO'];
|
||||
}
|
||||
$pathInfo = urldecode($pathInfo);
|
||||
$pathInfo = preg_replace('%^(/api)?(/greader\.php)?%', '', $pathInfo); //Discard common errors
|
||||
if ($pathInfo == '') {
|
||||
exit('OK');
|
||||
|
||||
Reference in New Issue
Block a user