mirror of
https://github.com/aler9/gortsplib
synced 2025-11-02 11:24:05 +08:00
fix docs
This commit is contained in:
@@ -155,7 +155,8 @@ func (c *ConnClient) WriteFrame(frame *InterleavedFrame) error {
|
||||
}
|
||||
|
||||
// Options writes an OPTIONS request and reads a response, that contains
|
||||
// the methods allowed by the server.
|
||||
// the methods allowed by the server. Since this method is not implemented by
|
||||
// every RTSP server, the function does not fail if the returned code is StatusNotFound.
|
||||
func (c *ConnClient) Options(u *url.URL) (*Response, error) {
|
||||
// strip path
|
||||
u = &url.URL{
|
||||
@@ -173,7 +174,6 @@ func (c *ConnClient) Options(u *url.URL) (*Response, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// OPTIONS is not available in some cameras, so StatusNotFound is not an error
|
||||
if res.StatusCode != StatusOK && res.StatusCode != StatusNotFound {
|
||||
return nil, fmt.Errorf("bad status code: %d (%s)", res.StatusCode, res.StatusMessage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user