aboutsummaryrefslogtreecommitdiff
path: root/src/cookie.h
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-12-06 15:52:55 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-12-06 15:52:55 +0300
commitb9a0844fe25cf717cdd796018bea2ae6eff58896 (patch)
tree1b536fe348ac33c1e124152e3e77c9ef8df590d3 /src/cookie.h
parent7bf4ef931b5d4007f12a19939b819a4d8fb31802 (diff)
downloadmagi-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.h10
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. */