summaryrefslogtreecommitdiffstats
path: root/lib/private/urlgenerator.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/urlgenerator.php')
-rw-r--r--lib/private/urlgenerator.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php
index e618aef268a..60da34f2d6e 100644
--- a/lib/private/urlgenerator.php
+++ b/lib/private/urlgenerator.php
@@ -147,6 +147,7 @@ class URLGenerator implements IURLGenerator {
* @return string the absolute version of the url
*/
public function getAbsoluteURL($url) {
- return \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . '/' . $url;
+ $separator = $url[0] === '/' ? '' : '/';
+ return \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . $separator . $url;
}
}