mirror of
https://github.com/aler9/gortsplib
synced 2025-10-09 17:10:06 +08:00
support control paths that start with '?'
This commit is contained in:
@@ -160,6 +160,12 @@ func (u *URL) SetUser(user *url.Userinfo) {
|
||||
|
||||
// AddControlPath adds a control path to a RTSP url.
|
||||
func (u *URL) AddControlPath(controlPath string) {
|
||||
// special case: query
|
||||
if controlPath[0] == '?' {
|
||||
u.inner.RawQuery += controlPath[1:]
|
||||
return
|
||||
}
|
||||
|
||||
// always insert the control path at the end of the url
|
||||
if u.inner.RawQuery != "" {
|
||||
if !strings.HasSuffix(u.inner.RawQuery, "/") {
|
||||
|
Reference in New Issue
Block a user