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

@@ -134,6 +134,10 @@ class Unirest
$query = '?'.http_build_query($query_parsed); $query = '?'.http_build_query($query_parsed);
} }
// Handle port seperator
if ($port && $port[0] != ":")
$port = ":" . $port;
// Return the completed URL // Return the completed URL
$result = $scheme . $host . $port . $path . $query; $result = $scheme . $host . $port . $path . $query;
return $result; return $result;