aboutsummaryrefslogtreecommitdiff
path: root/src/cookie.h
diff options
context:
space:
mode:
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. */