diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-04-30 17:03:43 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-04-30 17:03:43 +0000 |
commit | efd836d971c63b481545594ab31da7eadaff66f2 (patch) | |
tree | fbc4324691176fc3a7324586ca6aa58b45ebf971 /lib/cookie.h | |
parent | 836aaa1647eb075f0d0e47e5e1c09653f86ce61b (diff) |
Many cookie fixes:
o Save domains in jars like Mozilla does. It means all domains set in
Set-Cookie: headers are dot-prefixed.
o Save and use the 'tailmatch' field in the Mozilla/Netscape cookie jars (the
second column).
o Reject cookies using illegal domains in the Set-Cookie: line. Concerns
both domains with too few dots or domains that are outside the currently
operating server host's domain.
o Set the path part by default to the one used in the request, if none was
set in the Set-Cookie line.
Diffstat (limited to 'lib/cookie.h')
-rw-r--r-- | lib/cookie.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/cookie.h b/lib/cookie.h index edb648c65..a3a54c717 100644 --- a/lib/cookie.h +++ b/lib/cookie.h @@ -40,8 +40,7 @@ struct Cookie { char *domain; /* domain = <this> */ long expires; /* expires = <this> */ char *expirestr; /* the plain text version */ - - char field1; /* read from a cookie file, 1 => FALSE, 2=> TRUE */ + bool tailmatch; /* weather we do tail-matchning of the domain name */ /* RFC 2109 keywords. Version=1 means 2109-compliant cookie sending */ char *version; /* Version = <value> */ @@ -70,11 +69,11 @@ struct CookieInfo { #define MAX_NAME_TXT "255" /* - * Add a cookie to the internal list of cookies. The domain argument is only - * used if the header boolean is TRUE. + * Add a cookie to the internal list of cookies. The domain and path arguments + * are only used if the header boolean is TRUE. */ struct Cookie *Curl_cookie_add(struct CookieInfo *, bool header, char *line, - char *domain); + char *domain, char *path); struct CookieInfo *Curl_cookie_init(char *, struct CookieInfo *, bool); struct Cookie *Curl_cookie_getlist(struct CookieInfo *, char *, char *, bool); |