diff options
| author | 2015-07-23 09:37:29 +0200 | |
|---|---|---|
| committer | 2015-07-23 09:37:29 +0200 | |
| commit | 2e544d2c1a38151bf63f3649cecf72026b52d0f0 (patch) | |
| tree | 82dd2beb891b65c0a4749dc9ea1b9f982cd03178 /lib/Minz/Request.php | |
| parent | 28dd652228b8e863cddd3d03613c586c01796204 (diff) | |
| parent | 2d22bf300a8dabcc77237f4bb56bf6532486fca2 (diff) | |
Merge branch 'baseUrl' of https://github.com/Alkarex/FreshRSS into 906-fix-getBaseUrl
Diffstat (limited to 'lib/Minz/Request.php')
| -rw-r--r-- | lib/Minz/Request.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index b9eda82a5..67fbae126 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -100,7 +100,10 @@ class Minz_Request { } else { $url .= '://' . $host . ($port == 80 ? '' : ':' . $port); } - $url .= isset($_SERVER['REQUEST_URI']) ? dirname($_SERVER['REQUEST_URI']) : ''; + if (isset($_SERVER['REQUEST_URI'])) { + $path = $_SERVER['REQUEST_URI']; + $url .= substr($path, -1) === '/' ? substr($path, 0, -1) : dirname($path); + } } else { $url = rtrim($url, '/\\') . $baseUrlSuffix; } |
