diff options
Diffstat (limited to 'Utilities/cmcurl/lib/cookie.c')
-rw-r--r-- | Utilities/cmcurl/lib/cookie.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Utilities/cmcurl/lib/cookie.c b/Utilities/cmcurl/lib/cookie.c index 0303efb..4345a84 100644 --- a/Utilities/cmcurl/lib/cookie.c +++ b/Utilities/cmcurl/lib/cookie.c @@ -123,8 +123,9 @@ static void freecookie(struct Cookie *co) free(co); } -static bool tailmatch(const char *cookie_domain, size_t cookie_domain_len, - const char *hostname) +static bool cookie_tailmatch(const char *cookie_domain, + size_t cookie_domain_len, + const char *hostname) { size_t hostname_len = strlen(hostname); @@ -696,7 +697,7 @@ Curl_cookie_add(struct Curl_easy *data, if(!domain || (is_ip && !strncmp(valuep, domain, vlen) && (vlen == strlen(domain))) - || (!is_ip && tailmatch(valuep, vlen, domain))) { + || (!is_ip && cookie_tailmatch(valuep, vlen, domain))) { strstore(&co->domain, valuep, vlen); if(!co->domain) { badcookie = TRUE; @@ -1431,7 +1432,7 @@ struct Cookie *Curl_cookie_getlist(struct Curl_easy *data, /* now check if the domain is correct */ if(!co->domain || (co->tailmatch && !is_ip && - tailmatch(co->domain, strlen(co->domain), host)) || + cookie_tailmatch(co->domain, strlen(co->domain), host)) || ((!co->tailmatch || is_ip) && strcasecompare(host, co->domain)) ) { /* * the right part of the host matches the domain stuff in the |