mirror of
https://github.com/aler9/gortsplib
synced 2025-11-03 11:11:01 +08:00
server: restore authentication support
This commit is contained in:
@@ -543,9 +543,11 @@ func (sc *ServerConn) handleRequestInSession(
|
||||
) (*base.Response, error) {
|
||||
// handle directly in Session
|
||||
if sc.session != nil {
|
||||
// the SETUP request after ANNOUNCE don't have the session ID
|
||||
// since ANNOUNCE didn't provide it.
|
||||
if req.Method != base.Setup || sxID != "" {
|
||||
// session ID is optional in SETUP and ANNOUNCE requests, since
|
||||
// client may not have received the session ID yet due to multiple reasons:
|
||||
// * requests can be retries after code 301
|
||||
// * SETUP requests comes after ANNOUNCE response, that don't contain the session ID
|
||||
if sxID != "" {
|
||||
// the connection can't communicate with two sessions at once.
|
||||
if sxID != sc.session.secretID {
|
||||
return &base.Response{
|
||||
|
||||
Reference in New Issue
Block a user