mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 13:35:13 +00:00
ffserver: Try matching the RTSP url without a trailing slash
If the client sends PLAY/PAUSE requests with the same url as
specified in Content-Base, these requests may have urls with
trailing slashes.
(cherry picked from commit c2ca851b23
)
This commit is contained in:
parent
b2f893acc8
commit
003c32e72c
@ -3199,7 +3199,7 @@ static HTTPContext *find_rtp_session_with_url(const char *url,
|
||||
char path1[1024];
|
||||
const char *path;
|
||||
char buf[1024];
|
||||
int s;
|
||||
int s, len;
|
||||
|
||||
rtp_c = find_rtp_session(session_id);
|
||||
if (!rtp_c)
|
||||
@ -3219,6 +3219,10 @@ static HTTPContext *find_rtp_session_with_url(const char *url,
|
||||
return rtp_c;
|
||||
}
|
||||
}
|
||||
len = strlen(path);
|
||||
if (len > 0 && path[len - 1] == '/' &&
|
||||
!strncmp(path, rtp_c->stream->filename, len - 1))
|
||||
return rtp_c;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user