summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-01-29 10:52:46 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-01-29 10:52:46 +0100
commitc72a0860da7b2be3cb08313d137e130ddd1735c2 (patch)
tree48bcfd449702e1f15472fcbacac349fd187b16fa
parent0336a548f1d969aae5fc92ce22ad177a36f971fc (diff)
downloadcurl-bagder/cookie-prefix-case-sensitive.tar.gz
fixup the comparison as strncmp() returns 0 for match!bagder/cookie-prefix-case-sensitive
-rw-r--r--lib/cookie.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 49fb0a39b..fa3337598 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -537,9 +537,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(!strncmp("__Secure-", name, 9))
co->prefix |= COOKIE_PREFIX__SECURE;
- else if(strncmp("__Host-", name, 7))
+ else if(!strncmp("__Host-", name, 7))
co->prefix |= COOKIE_PREFIX__HOST;
}