summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-11-07 17:10:56 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-11-08 09:08:09 +0100
commit14061f784c47069d20d17dd9d6c6cf4613efeca5 (patch)
treed4d8942344d84c6734b2ad167cbd555a85ebc0c1 /lib
parentc0b24c93a99f5c3f97aa7c8377a7bcb7dbde8c1c (diff)
downloadcurl-14061f784c47069d20d17dd9d6c6cf4613efeca5.tar.gz
cookie: compare cookie prefixes case insensitively
Adapted to language in rfc6265bis draft-11. Closes #9863 Reviewed-by: Daniel Gustafsson
Diffstat (limited to 'lib')
-rw-r--r--lib/cookie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index a3c699d48..f3f3e4cf7 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -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;
}