Add User-Agent to RTSP Describe #235

This commit is contained in:
Alexey Khit
2023-02-03 14:11:30 +03:00
parent d21ce3d27d
commit da3137b6f0
+6
View File
@@ -304,6 +304,12 @@ func (c *Conn) Describe() error {
req.Header.Set("Require", "www.onvif.org/ver20/backchannel")
}
if c.UserAgent != "" {
// this camera will answer with 401 on DESCRIBE without User-Agent
// https://github.com/AlexxIT/go2rtc/issues/235
req.Header.Set("User-Agent", c.UserAgent)
}
res, err := c.Do(req)
if err != nil {
return err