summaryrefslogtreecommitdiff
path: root/server/vendor/guzzlehttp/psr7/src/Uri.php
diff options
context:
space:
mode:
authorArnaudVOTA <arnaud.vota@gmail.com>2016-01-27 11:04:02 +0100
committerArnaudVOTA <arnaud.vota@gmail.com>2016-01-27 11:04:02 +0100
commitb10e4679e0f0316bfe24098a84db040dcfc8d38f (patch)
tree3bdc7cb4b721a870eb9bab9696326071b1388ce6 /server/vendor/guzzlehttp/psr7/src/Uri.php
parent5466ce78f00038e742ef2a108c755f57ede451f5 (diff)
parent81d5c2a6464771c9a180d0214706a2f65f0b1d18 (diff)
Merge remote-tracking branch 'refs/remotes/origin/master' into vota_overlay
Diffstat (limited to 'server/vendor/guzzlehttp/psr7/src/Uri.php')
-rw-r--r--server/vendor/guzzlehttp/psr7/src/Uri.php17
1 files changed, 12 insertions, 5 deletions
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;
}