diff options
| author | 2015-07-17 23:43:43 +0200 | |
|---|---|---|
| committer | 2015-07-17 23:43:43 +0200 | |
| commit | 2d22bf300a8dabcc77237f4bb56bf6532486fca2 (patch) | |
| tree | 8b09a7b03885c0132359a3e79aa2a8f0ed149861 /lib/Minz | |
| parent | 9cc0ef231c985da0f16c64eb11f8bb9515cc27c5 (diff) | |
dirname problem
https://github.com/FreshRSS/FreshRSS/issues/906
Diffstat (limited to 'lib/Minz')
| -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; } |
