diff --git a/serverconn.go b/serverconn.go index 00cd4ded..1fc39bba 100644 --- a/serverconn.go +++ b/serverconn.go @@ -223,24 +223,6 @@ func (sc *ServerConn) handleRequest(req *base.Request) (*base.Response, error) { switch req.Method { case base.Options: - if h, ok := sc.s.Handler.(ServerHandlerOnOptions); ok { - pathAndQuery, ok := req.URL.RTSPPath() - if !ok { - return &base.Response{ - StatusCode: base.StatusBadRequest, - }, liberrors.ErrServerNoPath{} - } - - path, query := base.PathSplitQuery(pathAndQuery) - - return h.OnOptions(&ServerHandlerOnOptionsCtx{ - Conn: sc, - Req: req, - Path: path, - Query: query, - }) - } - var methods []string if _, ok := sc.s.Handler.(ServerHandlerOnDescribe); ok { methods = append(methods, string(base.Describe)) diff --git a/serverhandler.go b/serverhandler.go index fb95d5b9..7dbcc5da 100644 --- a/serverhandler.go +++ b/serverhandler.go @@ -39,19 +39,6 @@ type ServerHandlerOnResponse interface { OnResponse(*base.Response) } -// ServerHandlerOnOptionsCtx is the context of an OPTIONS request. -type ServerHandlerOnOptionsCtx struct { - Conn *ServerConn - Req *base.Request - Path string - Query string -} - -// ServerHandlerOnOptions can be implemented by a ServerHandler. -type ServerHandlerOnOptions interface { - OnOptions(*ServerHandlerOnOptionsCtx) (*base.Response, error) -} - // ServerHandlerOnDescribeCtx is the context of a DESCRIBE request. type ServerHandlerOnDescribeCtx struct { Conn *ServerConn