mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 06:46:42 +08:00
server: change behavior in case of unhandled methods
(https://github.com/aler9/rtsp-simple-server/issues/1066) Return 501 and keep connection open instead of returning 400 and closing the connection.
This commit is contained in:
@@ -48,16 +48,6 @@ func (e ErrServerCSeqMissing) Error() string {
|
||||
return "CSeq is missing"
|
||||
}
|
||||
|
||||
// ErrServerUnhandledRequest is an error that can be returned by a server.
|
||||
type ErrServerUnhandledRequest struct {
|
||||
Request *base.Request
|
||||
}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e ErrServerUnhandledRequest) Error() string {
|
||||
return fmt.Sprintf("unhandled request: %v %v", e.Request.Method, e.Request.URL)
|
||||
}
|
||||
|
||||
// ErrServerInvalidState is an error that can be returned by a server.
|
||||
type ErrServerInvalidState struct {
|
||||
AllowedList []fmt.Stringer
|
||||
|
Reference in New Issue
Block a user