Commit 541e5a3b authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Jacky Lam cookie parser fix for domains with preceeding dot

parent 5af61716
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -347,7 +347,13 @@ Curl_cookie_add(struct CookieInfo *c,
      /* the names are identical */

      if(clist->domain && co->domain) {
        if(strequal(clist->domain, co->domain))
        if(strequal(clist->domain, co->domain) ||
           (clist->domain[0]=='.' &&
            strequal(&(clist->domain[1]), co->domain)) ||
           (co->domain[0]=='.' &&
            strequal(clist->domain, &(co->domain[1]))) )
          /* The domains are identical, or at least identical if you skip the
             preceeding dot */
          replace_old=TRUE;
      }
      else if(!clist->domain && !co->domain)