Lines Matching refs:cookies
33 called before any cookies are set.
53 struct Cookies *Curl_cookie_getlist(struct CookieInfo *cookie,
56 For a given host and path, return a linked list of cookies that
61 It shall only return cookies that haven't expired.
64 Example set of cookies:
258 * Load cookies from all given cookie files (CURLOPT_COOKIEFILE).
270 data->cookies,
278 data->cookies = newcookies;
300 * remove_expired() removes expired cookies.
302 static void remove_expired(struct CookieInfo *cookies)
307 co = cookies->cookies;
312 if(co == cookies->cookies) {
313 cookies->cookies = co->next;
318 cookies->numcookies--;
383 bool badcookie = FALSE; /* cookies are good by default. mmmmm yummy */
570 /* we already know there are no more cookies */
601 /* Session cookies have expires set to 0 so if we get that back
659 reading the odd netscape cookies-file format here */
665 /* IE introduced HTTP-only cookies to prevent XSS attacks. Cookies
782 c->newsession && /* clean session cookies */
794 /* at first, remove expired cookies */
804 "cookie '%s' dropped, domain '%s' must not set cookies for '%s'\n",
812 clist = c->cookies;
844 /* Both cookies matched fine, except that the already present
847 live cookies stay alive */
886 /* Only show this when NOT reading the cookies from a file */
897 c->cookies = co;
909 * called before any cookies are set. File may be NULL.
911 * If 'newsession' is TRUE, discard all "session cookies" on read from file.
913 * Returns NULL on out of memory. Invalid cookies are ignored.
1029 * For a given host and path, return a linked list of cookies that the
1033 * It shall only return cookies that haven't expired.
1048 if(!c || !c->cookies)
1049 return NULL; /* no cookie struct or no cookies in the struct */
1051 /* at first, remove expired cookies */
1057 co = c->cookies;
1073 /* now check the left part of the path with the cookies path
1147 * Clear all existing cookies and reset the counter.
1150 void Curl_cookie_clearall(struct CookieInfo *cookies)
1152 if(cookies) {
1153 Curl_cookie_freelist(cookies->cookies, TRUE);
1154 cookies->cookies = NULL;
1155 cookies->numcookies = 0;
1163 * Free a list of cookies previously returned by Curl_cookie_getlist();
1166 * list or actually also free all cookies within the list as well.
1189 * Free all session cookies in the cookies list.
1192 void Curl_cookie_clearsess(struct CookieInfo *cookies)
1196 if(!cookies || !cookies->cookies)
1199 first = curr = prev = cookies->cookies;
1213 cookies->numcookies--;
1219 cookies->cookies = first;
1234 Curl_cookie_freelist(c->cookies, TRUE);
1272 * Writes all internally known cookies to the specified file. Specify
1285 /* If there are no known cookies, we don't write or even create any
1289 /* at first, remove expired cookies */
1304 "# https://curl.haxx.se/docs/http-cookies.html\n"
1308 for(co = c->cookies; co; co = co->next) {
1335 if((data->cookies == NULL) ||
1336 (data->cookies->numcookies == 0))
1339 for(c = data->cookies->cookies; c; c = c->next) {
1371 /* if we have a destination file for all the cookies to get dumped to */
1372 if(cookie_output(data->cookies, data->set.str[STRING_COOKIEJAR]))
1373 infof(data, "WARNING: failed to save cookies in %s\n",
1386 if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
1387 Curl_cookie_cleanup(data->cookies);