修复获取HOST无端口问题

This commit is contained in:
xx
2024-07-20 09:43:14 +08:00
parent b45daa62c9
commit 71328824f5

View File

@@ -309,9 +309,14 @@ bool ylib::network::parse_url_host(const std::string &url, std::string &host)
}
__arr = strutils::split(temp,':');
if (__arr.size() == 2)
host = __arr[0];
{
host = __arr[0]+":"+__arr[1];
}
else
host = temp;
return true;
}
bool ylib::network::is_ipv4(const std::string& value)