mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:31:41 +03:00
http: make Curl_compareheader handle multiple commas in header
For robustness
This commit is contained in:
parent
ed7bfcd17d
commit
133b125b89
1 changed files with 5 additions and 1 deletions
|
|
@ -1449,7 +1449,11 @@ bool Curl_compareheader(const char *headerline, /* line to check */
|
|||
if(curlx_str_until(&p, &next, MAX_HTTP_RESP_HEADER_SIZE, ',') ||
|
||||
curlx_str_single(&p, ','))
|
||||
break; /* no comma, get out */
|
||||
curlx_str_passblanks(&p);
|
||||
|
||||
/* if there are more dummy commas, move over them as well */
|
||||
do
|
||||
curlx_str_passblanks(&p);
|
||||
while(!curlx_str_single(&p, ','));
|
||||
len -= (p - o);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue