Merge pull request #6935 from owncloud/fix_urlGenerator

Add missing slash in URLGenerator::getAbsoluteURL().
This commit is contained in:
Björn Schießle 2014-02-20 14:57:03 +01:00
commit 4eadc36094

View file

@ -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;
}
}