增加checkHost参数判断

This commit is contained in:
baiyfcu 2024-04-03 14:27:18 +08:00
parent 66b18bc7f8
commit e9887c6cd9
1 changed files with 2 additions and 0 deletions

View File

@ -302,6 +302,8 @@ void RtspUrl::setup(bool is_ssl, const string &url, const string &user, const st
}
static void inline checkHost(std::string &host) {
if (host.size() == 0)
return;
if (host.back() == ']' && host.front() == '[') {
// ipv6去除方括号
host.pop_back();