mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 20:41:59 -08:00
clientrtmp: allow inserting path in the Stream key field of OBS
This commit is contained in:
parent
87dd87aa49
commit
5856ac3de9
1 changed files with 3 additions and 3 deletions
|
|
@ -50,10 +50,10 @@ func ipEqualOrInRange(ip net.IP, ips []interface{}) bool {
|
|||
}
|
||||
|
||||
func pathNameAndQuery(inURL *url.URL) (string, url.Values) {
|
||||
// remove trailing slashes inserted by OBS and some other clients
|
||||
tmp := strings.TrimSuffix(inURL.String(), "/")
|
||||
// remove leading and trailing slashes inserted by OBS and some other clients
|
||||
tmp := strings.TrimRight(inURL.String(), "/")
|
||||
ur, _ := url.Parse(tmp)
|
||||
pathName := strings.TrimPrefix(ur.Path, "/")
|
||||
pathName := strings.TrimLeft(ur.Path, "/")
|
||||
return pathName, ur.Query()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue