diff options
author | redmatrix <git@macgirvin.com> | 2016-07-28 19:58:05 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-28 19:58:05 -0700 |
commit | ae5c10a71cd29722f63b379b62801dea52a9ab8f (patch) | |
tree | 5c9c0c6668369f5ffbd4f5c7b635c9c1ec96b996 /vendor/sabre/dav/lib/DAV/Client.php | |
parent | 2d4b75428a87038b9a637bf49fc0a91c91b392fb (diff) | |
parent | 4d5202353fbce12f19fbe578205259d2a7bd3f04 (diff) | |
download | volse-hubzilla-1.10.tar.gz volse-hubzilla-1.10.tar.bz2 volse-hubzilla-1.10.zip |
Merge branch '1.10RC'1.10
Diffstat (limited to 'vendor/sabre/dav/lib/DAV/Client.php')
-rw-r--r-- | vendor/sabre/dav/lib/DAV/Client.php | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/vendor/sabre/dav/lib/DAV/Client.php b/vendor/sabre/dav/lib/DAV/Client.php index d46b397b6..08d5d4702 100644 --- a/vendor/sabre/dav/lib/DAV/Client.php +++ b/vendor/sabre/dav/lib/DAV/Client.php @@ -3,6 +3,7 @@ namespace Sabre\DAV; use Sabre\HTTP; +use Sabre\Uri; /** * SabreDAV DAV client @@ -387,20 +388,10 @@ class Client extends HTTP\Client { */ function getAbsoluteUrl($url) { - // If the url starts with http:// or https://, the url is already absolute. - if (preg_match('/^http(s?):\/\//', $url)) { - return $url; - } - - // If the url starts with a slash, we must calculate the url based off - // the root of the base url. - if (strpos($url, '/') === 0) { - $parts = parse_url($this->baseUri); - return $parts['scheme'] . '://' . $parts['host'] . (isset($parts['port']) ? ':' . $parts['port'] : '') . $url; - } - - // Otherwise... - return $this->baseUri . $url; + return Uri\resolve( + $this->baseUri, + $url + ); } |