1
0
mirror of https://github.com/danog/dns.git synced 2024-11-30 04:29:06 +01:00

Fix parsing servers with port in parseCustomServerUri

This commit is contained in:
Paul 2017-01-25 12:52:55 +01:00
parent 2c901b26c9
commit 885515990c

View File

@ -444,9 +444,9 @@ REGEX;
if (strpos($uri, "://") !== false) {
return $uri;
}
if (($colonPos = strrpos(":", $uri)) !== false) {
if (($colonPos = strrpos($uri, ":")) !== false) {
$addr = \substr($uri, 0, $colonPos);
$port = \substr($uri, $colonPos);
$port = \substr($uri, $colonPos + 1);
} else {
$addr = $uri;
$port = 53;