mirror of
https://github.com/curl/curl.git
synced 2026-07-24 13:37:18 +03:00
http: make the RTSP version check stricter
- make it only accept version 1.0, as that is the version curl supports - convert the parser to use strparse - the status code max is now 999, but it does allow != 3 digits Closes #16435
This commit is contained in:
parent
cfc657a48d
commit
4c5099868e
5 changed files with 35 additions and 23 deletions
|
|
@ -203,6 +203,16 @@ int Curl_str_casecompare(struct Curl_str *str, const char *check)
|
|||
return ((str->len == clen) && strncasecompare(str->str, check, clen));
|
||||
}
|
||||
|
||||
/* case sensitive string compare. Returns non-zero on match. */
|
||||
int Curl_str_cmp(struct Curl_str *str, const char *check)
|
||||
{
|
||||
if(check) {
|
||||
size_t clen = strlen(check);
|
||||
return ((str->len == clen) && !strncmp(str->str, check, clen));
|
||||
}
|
||||
return !!(str->len);
|
||||
}
|
||||
|
||||
/* Trim off 'num' number of bytes from the beginning (left side) of the
|
||||
string. If 'num' is larger than the string, return error. */
|
||||
int Curl_str_nudge(struct Curl_str *str, size_t num)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue