From 81d5c2a6464771c9a180d0214706a2f65f0b1d18 Mon Sep 17 00:00:00 2001 From: josselin Date: Mon, 25 Jan 2016 22:08:02 +0100 Subject: Added php-opencloud/openstack as SubModule --- server/vendor/guzzlehttp/psr7/src/Uri.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'server/vendor/guzzlehttp/psr7/src/Uri.php') diff --git a/server/vendor/guzzlehttp/psr7/src/Uri.php b/server/vendor/guzzlehttp/psr7/src/Uri.php index d428f2e..23fa2a4 100644 --- a/server/vendor/guzzlehttp/psr7/src/Uri.php +++ b/server/vendor/guzzlehttp/psr7/src/Uri.php @@ -477,21 +477,28 @@ class Uri implements UriInterface $uri = ''; if (!empty($scheme)) { - $uri .= $scheme . '://'; + $uri .= $scheme . ':'; } + $hierPart = ''; + if (!empty($authority)) { - $uri .= $authority; + if (!empty($scheme)) { + $hierPart .= '//'; + } + $hierPart .= $authority; } if ($path != null) { // Add a leading slash if necessary. - if ($uri && substr($path, 0, 1) !== '/') { - $uri .= '/'; + if ($hierPart && substr($path, 0, 1) !== '/') { + $hierPart .= '/'; } - $uri .= $path; + $hierPart .= $path; } + $uri .= $hierPart; + if ($query != null) { $uri .= '?' . $query; } -- cgit v1.2.3