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:
parent
febd45d514
commit
f9941a325b
5 changed files with 45 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue