diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2019-12-06 15:52:55 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2019-12-06 15:52:55 +0300 |
commit | b9a0844fe25cf717cdd796018bea2ae6eff58896 (patch) | |
tree | 1b536fe348ac33c1e124152e3e77c9ef8df590d3 /src/cookie.h | |
parent | 7bf4ef931b5d4007f12a19939b819a4d8fb31802 (diff) | |
download | magi-b9a0844fe25cf717cdd796018bea2ae6eff58896.tar magi-b9a0844fe25cf717cdd796018bea2ae6eff58896.tar.xz magi-b9a0844fe25cf717cdd796018bea2ae6eff58896.zip |
[magi] change of cookies and tempfile callback
Diffstat (limited to 'src/cookie.h')
-rw-r--r-- | src/cookie.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cookie.h b/src/cookie.h index 0430226..9419457 100644 --- a/src/cookie.h +++ b/src/cookie.h @@ -6,9 +6,9 @@ struct magi_cookie { /* All pointers must be valid as 'free' arguments. */ char * name; char * data; - char * path; - char * domain; - char * port; + char * path; /* Without '/' at the end. */ + char * domain; /* With dot at the begining. */ + char * max_age; /* In seconds until discard, used only in response. */ }; struct magi_cookie_list { @@ -21,7 +21,9 @@ struct magi_cookie_list { int magi_cookie_list_add(struct magi_cookie_list ** list, struct magi_cookie * item); -/* Data of the first node in list: node.name == name; else null. */ +/* Data of last cookie in list: cookie.name == name, returns null if no such; + * Last cookie in list is first from request, and from RFC 2109 we know that + * first cookie is the most accurate for request's domain and path. */ char * magi_cookie_list_get(struct magi_cookie_list * list, const char * name); /* Freeing and invalidation of list. */ |