#include "setup.h"#include <stdlib.h>#include <string.h>#include <curl/mprintf.h>#include "urldata.h"#include "cookie.h"#include "strequal.h"#include "strtok.h"#include "sendf.h"#include "memory.h"#include "share.h"#include "strtoofft.h"Go to the source code of this file.
Defines | |
| #define | _MPRINTF_REPLACE |
Functions | |
| static void | freecookie (struct Cookie *co) |
| static bool | tailmatch (const char *little, const char *bigone) |
| void | Curl_cookie_loadfiles (struct SessionHandle *data) |
| struct Cookie * | Curl_cookie_add (struct SessionHandle *data, struct CookieInfo *c, bool httpheader, char *lineptr, char *domain, char *path) |
| struct CookieInfo * | Curl_cookie_init (struct SessionHandle *data, char *file, struct CookieInfo *inc, bool newsession) |
| struct Cookie * | Curl_cookie_getlist (struct CookieInfo *c, char *host, char *path, bool secure) |
| void | Curl_cookie_clearall (struct CookieInfo *cookies) |
| void | Curl_cookie_freelist (struct Cookie *co) |
| void | Curl_cookie_clearsess (struct CookieInfo *cookies) |
| void | Curl_cookie_cleanup (struct CookieInfo *c) |
| static char * | get_netscape_format (const struct Cookie *co) |
| int | Curl_cookie_output (struct CookieInfo *c, char *dumphere) |
| struct curl_slist * | Curl_cookie_list (struct SessionHandle *data) |
| struct Cookie* Curl_cookie_add | ( | struct SessionHandle * | data, | |
| struct CookieInfo * | c, | |||
| bool | httpheader, | |||
| char * | lineptr, | |||
| char * | domain, | |||
| char * | path | |||
| ) | [read] |
Definition at line 167 of file cookie.c.
References calloc, CookieInfo::cookies, curl_getdate(), curlx_strtoofft, Cookie::domain, Cookie::expires, Cookie::expirestr, FALSE, free, freecookie(), infof, ISBLANK, Cookie::livecookie, malloc, MAX_COOKIE_LINE, MAX_COOKIE_LINE_TXT, MAX_NAME, MAX_NAME_TXT, Cookie::maxage, Cookie::name, CookieInfo::newsession, Cookie::next, NULL, CookieInfo::numcookies, Cookie::path, CookieInfo::running, Cookie::secure, strdup, strequal, strtok_r, Cookie::tailmatch, tailmatch(), TRUE, Cookie::value, and Cookie::version.
Referenced by Curl_cookie_init(), Curl_readwrite(), and Curl_setopt().
| void Curl_cookie_cleanup | ( | struct CookieInfo * | c | ) |
Definition at line 886 of file cookie.c.
References CookieInfo::cookies, CookieInfo::filename, free, freecookie(), and Cookie::next.
Referenced by Curl_close(), Curl_setopt(), curl_share_cleanup(), and curl_share_setopt().
| void Curl_cookie_clearall | ( | struct CookieInfo * | cookies | ) |
Definition at line 810 of file cookie.c.
References CookieInfo::cookies, Curl_cookie_freelist(), NULL, and CookieInfo::numcookies.
Referenced by Curl_setopt().
| void Curl_cookie_clearsess | ( | struct CookieInfo * | cookies | ) |
Definition at line 848 of file cookie.c.
References CookieInfo::cookies, Cookie::expires, free, Cookie::next, NULL, and CookieInfo::numcookies.
Referenced by Curl_setopt().
| void Curl_cookie_freelist | ( | struct Cookie * | co | ) |
Definition at line 827 of file cookie.c.
References free, and Cookie::next.
Referenced by Curl_cookie_clearall(), and Curl_http().
| struct Cookie* Curl_cookie_getlist | ( | struct CookieInfo * | c, | |
| char * | host, | |||
| char * | path, | |||
| bool | secure | |||
| ) | [read] |
Definition at line 736 of file cookie.c.
References CookieInfo::cookies, Cookie::domain, Cookie::expires, free, malloc, Cookie::next, NULL, Cookie::path, Cookie::secure, strequal, tailmatch(), Cookie::tailmatch, and TRUE.
Referenced by Curl_http().
| struct CookieInfo* Curl_cookie_init | ( | struct SessionHandle * | data, | |
| char * | file, | |||
| struct CookieInfo * | inc, | |||
| bool | newsession | |||
| ) | [read] |
Definition at line 657 of file cookie.c.
References c, calloc, checkprefix, Curl_cookie_add(), FALSE, CookieInfo::filename, free, ISBLANK, malloc, MAX_COOKIE_LINE, CookieInfo::newsession, NULL, CookieInfo::running, strdup, strequal, and TRUE.
Referenced by Curl_cookie_loadfiles(), curl_easy_duphandle(), Curl_setopt(), and curl_share_setopt().
| struct curl_slist* Curl_cookie_list | ( | struct SessionHandle * | data | ) | [read] |
Definition at line 990 of file cookie.c.
References c, CookieInfo::cookies, SessionHandle::cookies, curl_slist_append(), curl_slist_free_all(), free, get_netscape_format(), Cookie::next, NULL, and CookieInfo::numcookies.
Referenced by Curl_getinfo().
| void Curl_cookie_loadfiles | ( | struct SessionHandle * | data | ) |
Definition at line 140 of file cookie.c.
References SessionHandle::change, DynamicStatic::cookielist, SessionHandle::cookies, UserDefined::cookiesession, Curl_cookie_init(), CURL_LOCK_ACCESS_SINGLE, CURL_LOCK_DATA_COOKIE, Curl_share_lock(), Curl_share_unlock(), curl_slist_free_all(), curl_slist::data, curl_slist::next, NULL, and SessionHandle::set.
Referenced by Curl_close(), and Curl_pretransfer().
| int Curl_cookie_output | ( | struct CookieInfo * | c, | |
| char * | dumphere | |||
| ) |
Definition at line 940 of file cookie.c.
References CookieInfo::cookies, FALSE, free, get_netscape_format(), Cookie::next, NULL, CookieInfo::numcookies, strequal, and TRUE.
Referenced by Curl_close().
| static void freecookie | ( | struct Cookie * | co | ) | [static] |
Definition at line 106 of file cookie.c.
References Cookie::domain, Cookie::expirestr, free, Cookie::maxage, Cookie::name, Cookie::path, Cookie::value, and Cookie::version.
Referenced by Curl_cookie_add(), and Curl_cookie_cleanup().
| static char* get_netscape_format | ( | const struct Cookie * | co | ) | [static] |
Definition at line 910 of file cookie.c.
References Cookie::domain, Cookie::expires, FORMAT_OFF_T, Cookie::name, Cookie::path, Cookie::secure, Cookie::tailmatch, and Cookie::value.
Referenced by Curl_cookie_list(), and Curl_cookie_output().
| static bool tailmatch | ( | const char * | little, | |
| const char * | bigone | |||
| ) | [static] |
Definition at line 126 of file cookie.c.
References FALSE, and strequal.
Referenced by Curl_cookie_add(), and Curl_cookie_getlist().
1.5.6