1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTMP URL supports domain in stream parameters. v4.0.255

This commit is contained in:
winlin 2022-08-17 11:08:32 +08:00
parent febd45d514
commit f9941a325b
5 changed files with 45 additions and 7 deletions

View file

@ -53,12 +53,17 @@ void srs_vhost_resolve(string& vhost, string& app, string& param)
if ((pos = app.find("?")) != std::string::npos) {
std::string query = app.substr(pos + 1);
app = app.substr(0, pos);
if ((pos = query.find("vhost?")) != std::string::npos) {
query = query.substr(pos + 6);
if (!query.empty()) {
vhost = query;
}
} else if ((pos = query.find("domain?")) != std::string::npos) {
query = query.substr(pos + 7);
if (!query.empty()) {
vhost = query;
}
}
}