mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:13:32 +03:00
cookie: compare cookie prefixes case insensitively
Adapted to language in rfc6265bis draft-11. Closes #9863 Reviewed-by: Daniel Gustafsson
This commit is contained in:
parent
c0b24c93a9
commit
14061f784c
2 changed files with 5 additions and 5 deletions
|
|
@ -605,9 +605,9 @@ Curl_cookie_add(struct Curl_easy *data,
|
|||
* only test for names where that can possibly be true.
|
||||
*/
|
||||
if(nlen > 3 && name[0] == '_' && name[1] == '_') {
|
||||
if(!strncmp("__Secure-", name, 9))
|
||||
if(strncasecompare("__Secure-", name, 9))
|
||||
co->prefix |= COOKIE_PREFIX__SECURE;
|
||||
else if(!strncmp("__Host-", name, 7))
|
||||
else if(strncasecompare("__Host-", name, 7))
|
||||
co->prefix |= COOKIE_PREFIX__HOST;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue