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

Forward add question mark to the end. v6.0.30 (#3438)

Co-authored-by: pengfei.ma <pengfei.ma@ctechm.com>
Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
Winlin 2023-02-25 19:13:48 +08:00 committed by GitHub
parent 67867242fc
commit dc7be76bb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 3 deletions

View file

@ -238,8 +238,8 @@ string srs_generate_stream_with_query(string host, string vhost, string stream,
}
}
// Remove the start & when param is empty.
query = srs_string_trim_start(query, "&");
// Remove the start & and ? when param is empty.
query = srs_string_trim_start(query, "&?");
// Prefix query with ?.
if (!query.empty() && !srs_string_starts_with(query, "?")) {