Support port colon, fixes #8

:)
This commit is contained in:
Nijiko Yonskai
2013-05-16 15:05:06 -06:00
parent 109df42f2a
commit 82791aa32e

View File

@@ -133,6 +133,10 @@ class Unirest
// Encode and build query based on RFC 1738
$query = '?'.http_build_query($query_parsed);
}
// Handle port seperator
if ($port && $port[0] != ":")
$port = ":" . $port;
// Return the completed URL
$result = $scheme . $host . $port . $path . $query;
@@ -182,4 +186,4 @@ function is_hex($hex) {
if (empty($hex)) { $hex = 0; };
$dec = hexdec($hex);
return ($hex == dechex($dec));
}
}