mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +08:00
Merge pull request #9 from ciuncan/master
Fix #8 - Do options request to resource path rather than /
This commit is contained in:
@@ -351,12 +351,12 @@ func (c *ConnClient) Options(u *url.URL) (*base.Response, error) {
|
|||||||
|
|
||||||
res, err := c.Do(&base.Request{
|
res, err := c.Do(&base.Request{
|
||||||
Method: base.OPTIONS,
|
Method: base.OPTIONS,
|
||||||
// strip path
|
|
||||||
Url: &url.URL{
|
Url: &url.URL{
|
||||||
Scheme: "rtsp",
|
Scheme: "rtsp",
|
||||||
Host: u.Host,
|
Host: u.Host,
|
||||||
User: u.User,
|
User: u.User,
|
||||||
Path: "/",
|
// use the stream path, otherwise some cameras do not reply
|
||||||
|
Path: u.Path,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -776,7 +776,8 @@ func (c *ConnClient) LoopUDP() error {
|
|||||||
Scheme: "rtsp",
|
Scheme: "rtsp",
|
||||||
Host: c.streamUrl.Host,
|
Host: c.streamUrl.Host,
|
||||||
User: c.streamUrl.User,
|
User: c.streamUrl.User,
|
||||||
Path: "/",
|
// use the stream path, otherwise some cameras do not reply
|
||||||
|
Path: c.streamUrl.Path,
|
||||||
},
|
},
|
||||||
SkipResponse: true,
|
SkipResponse: true,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user