修复获取HOST无端口问题
This commit is contained in:
@@ -309,9 +309,14 @@ bool ylib::network::parse_url_host(const std::string &url, std::string &host)
|
|||||||
}
|
}
|
||||||
__arr = strutils::split(temp,':');
|
__arr = strutils::split(temp,':');
|
||||||
if (__arr.size() == 2)
|
if (__arr.size() == 2)
|
||||||
host = __arr[0];
|
{
|
||||||
|
host = __arr[0]+":"+__arr[1];
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
host = temp;
|
host = temp;
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool ylib::network::is_ipv4(const std::string& value)
|
bool ylib::network::is_ipv4(const std::string& value)
|
||||||
|
|||||||
Reference in New Issue
Block a user