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:
aler9
2022-08-07 13:49:15 +02:00
parent 4940e8faeb
commit a2c6a7fb97
4 changed files with 99 additions and 44 deletions

View File

@@ -1133,8 +1133,8 @@ func (ss *ServerSession) handleRequest(sc *ServerConn, req *base.Request) (*base
}
return &base.Response{
StatusCode: base.StatusBadRequest,
}, liberrors.ErrServerUnhandledRequest{Request: req}
StatusCode: base.StatusNotImplemented,
}, nil
}
func (ss *ServerSession) runWriter() {