完善非法url提示:#2129
This commit is contained in:
parent
f05a9501fa
commit
04422b31b6
|
|
@ -220,7 +220,7 @@ void splitUrl(const std::string &url, std::string &host, uint16_t &port) {
|
||||||
checkHost(host);
|
checkHost(host);
|
||||||
return;
|
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);
|
CHECK(sscanf(url.data() + pos + 1, "%" SCNu16, &port) == 1, "parse port from url failed:", url);
|
||||||
host = url.substr(0, pos);
|
host = url.substr(0, pos);
|
||||||
checkHost(host);
|
checkHost(host);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue