summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/cookie.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libcurl/src/cookie.c')
-rw-r--r--libs/libcurl/src/cookie.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/libcurl/src/cookie.c b/libs/libcurl/src/cookie.c
index 61cd0948a8..e905065930 100644
--- a/libs/libcurl/src/cookie.c
+++ b/libs/libcurl/src/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