mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Improve test coverage for protocols.
This commit is contained in:
parent
bf92172e62
commit
25f132ec2f
3 changed files with 363 additions and 140 deletions
|
@ -76,9 +76,6 @@ void srs_vhost_resolve(string& vhost, string& app, string& param)
|
|||
if (!query.empty()) {
|
||||
vhost = query;
|
||||
}
|
||||
if ((pos = vhost.find("?")) != std::string::npos) {
|
||||
vhost = vhost.substr(0, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +196,7 @@ string srs_generate_stream_with_query(string host, string vhost, string stream,
|
|||
}
|
||||
|
||||
// Remove the start & when param is empty.
|
||||
srs_string_trim_start(query, "&");
|
||||
query = srs_string_trim_start(query, "&");
|
||||
|
||||
// Prefix query with ?.
|
||||
if (!query.empty() && !srs_string_starts_with(query, "?")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue