Lines Matching defs:cookies
35 called before any cookies are set.
59 For a given host and path, return a linked list of cookies that
64 It shall only return cookies that haven't expired.
67 Example set of cookies:
327 * Load cookies from all given cookie files (CURLOPT_COOKIEFILE).
338 Curl_cookie_init(data, list->data, data->cookies,
347 data->cookies = newcookies;
374 * Remove expired cookies from the hash by inspecting the expires timestamp on
377 * more cookies expire, then processing will exit early in case this timestamp
380 static void remove_expired(struct CookieInfo *cookies)
389 * cookies to evict. If we need to evict however, reset the next_expiration
392 * all cookies.
394 if(now < cookies->next_expiration &&
395 cookies->next_expiration != CURL_OFF_T_MAX)
398 cookies->next_expiration = CURL_OFF_T_MAX;
402 co = cookies->cookies[i];
407 cookies->cookies[i] = co->next;
412 cookies->numcookies--;
420 if(co->expires && co->expires < cookies->next_expiration)
421 cookies->next_expiration = co->expires;
499 bool badcookie = FALSE; /* cookies are good by default. mmmmm yummy */
561 /* Reject cookies with a TAB inside the value */
632 * secure cookies are only allowed to be set when the connection is
769 * Session cookies have expires set to 0 so if we get that back
848 * reading the odd netscape cookies-file format here
856 * IE introduced HTTP-only cookies to prevent XSS attacks. Cookies marked
947 /* For Netscape file format cookies we check prefix on the name */
1002 c->newsession && /* clean session cookies */
1017 /* at first, remove expired cookies */
1048 "set cookies for '%s'", co->name, domain, co->domain);
1057 clist = c->cookies[myhash];
1124 * Both cookies matched fine, except that the already present cookie is
1126 * read from a file and thus isn't "live". "live" cookies are preferred
1162 /* Only show this when NOT reading the cookies from a file */
1173 c->cookies[myhash] = co;
1192 * called before any cookies are set. File may be NULL in which case only the
1195 * If 'newsession' is TRUE, discard all "session cookies" on read from file.
1200 * Returns NULL on out of memory. Invalid cookies are ignored.
1264 * Remove expired cookies from the hash. We must make sure to run this
1294 * Helper function to sort cookies such that the longest path gets before the
1333 * Helper function to sort cookies according to creation time.
1378 * For a given host and path, return a linked list of cookies that the client
1382 * It shall only return cookies that haven't expired.
1396 if(!c || !c->cookies[myhash])
1397 return NULL; /* no cookie struct or no cookies in the struct */
1399 /* at first, remove expired cookies */
1405 co = c->cookies[myhash];
1422 * now check the left part of the path with the cookies path
1442 infof(data, "Included max number of cookies (%zu) in request!",
1498 * Clear all existing cookies and reset the counter.
1500 void Curl_cookie_clearall(struct CookieInfo *cookies)
1502 if(cookies) {
1505 Curl_cookie_freelist(cookies->cookies[i]);
1506 cookies->cookies[i] = NULL;
1508 cookies->numcookies = 0;
1515 * Free a list of cookies previously returned by Curl_cookie_getlist();
1530 * Free all session cookies in the cookies list.
1532 void Curl_cookie_clearsess(struct CookieInfo *cookies)
1537 if(!cookies)
1541 if(!cookies->cookies[i])
1544 first = curr = prev = cookies->cookies[i];
1558 cookies->numcookies--;
1564 cookies->cookies[i] = first;
1578 Curl_cookie_freelist(c->cookies[i]);
1619 * Writes all internally known cookies to the specified file. Specify
1637 /* at first, remove expired cookies */
1652 "# https://curl.se/docs/http-cookies.html\n"
1667 /* only sort the cookies with a domain property */
1669 for(co = c->cookies[i]; co; co = co->next) {
1725 if(!data->cookies || (data->cookies->numcookies == 0))
1729 for(c = data->cookies->cookies[i]; c; c = c->next) {
1766 /* if we have a destination file for all the cookies to get dumped to */
1767 res = cookie_output(data, data->cookies, data->set.str[STRING_COOKIEJAR]);
1769 infof(data, "WARNING: failed to save cookies in %s: %s",
1776 if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
1777 Curl_cookie_cleanup(data->cookies);
1778 data->cookies = NULL;