11 #include <curl/curl.h>
14 struct Cookie *next; /* next in the chain */
15 char *name; /* <this> = value */
16 char *value; /* name = <this> */
17 char *path; /* path = <this> */
18 char *domain; /* domain = <this> */
19 time_t expires; /* expires = <this> */
20 char *expirestr; /* the plain text version */
22 /* RFC 2109 keywords. Version=1 means 2109-compliant cookie sending */
23 char *version; /* Version = <value> */
24 char *maxage; /* Max-Age = <value> */
26 bool secure; /* whether the 'secure' keyword was used */
30 /* linked list of cookies we know of */
31 struct Cookie *cookies;
33 char *filename; /* file we read from/write to */
36 /* This is the maximum line length we accept for a cookie line */
37 #define MAX_COOKIE_LINE 2048
38 #define MAX_COOKIE_LINE_TXT "2047"
40 /* This is the maximum length of a cookie name we deal with: */
42 #define MAX_NAME_TXT "255"
44 struct Cookie *cookie_add(struct CookieInfo *, bool, char *);
45 struct CookieInfo *cookie_init(char *);
46 struct Cookie *cookie_getlist(struct CookieInfo *, char *, char *, bool);
47 void cookie_freelist(struct Cookie *);
48 void cookie_cleanup(struct CookieInfo *);