aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/DAV/Client.php
diff options
context:
space:
mode:
authorhubzilla <git@macgirvin.com>2016-06-30 09:34:22 +1000
committerGitHub <noreply@github.com>2016-06-30 09:34:22 +1000
commit05aba0b4dd9ce5798e2c8bb57900b03ae96a233e (patch)
tree0910b2128981452a1c61ba6b6b4683dc51568027 /vendor/sabre/dav/lib/DAV/Client.php
parentf098600c41553bc47267a61fb47a4957046e696e (diff)
parent3102440d407fe195878b9535aae4fd0da750f437 (diff)
downloadvolse-hubzilla-05aba0b4dd9ce5798e2c8bb57900b03ae96a233e.tar.gz
volse-hubzilla-05aba0b4dd9ce5798e2c8bb57900b03ae96a233e.tar.bz2
volse-hubzilla-05aba0b4dd9ce5798e2c8bb57900b03ae96a233e.zip
Merge pull request #444 from git-marijus/dev
Merge branch sabre32 into dev
Diffstat (limited to 'vendor/sabre/dav/lib/DAV/Client.php')
-rw-r--r--vendor/sabre/dav/lib/DAV/Client.php19
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
+ );
}