完善非法url提示:#2129

This commit is contained in:
xiongziliang 2022-12-04 16:21:08 +08:00
parent f05a9501fa
commit 04422b31b6

View File

@ -220,7 +220,7 @@ void splitUrl(const std::string &url, std::string &host, uint16_t &port) {
checkHost(host);
return;
}
CHECK(pos > 0, "invalid url:", port);
CHECK(pos > 0, "invalid url:", url);
CHECK(sscanf(url.data() + pos + 1, "%" SCNu16, &port) == 1, "parse port from url failed:", url);
host = url.substr(0, pos);
checkHost(host);