27#ifndef __NILOREA_COOKIES_HEADER
28#define __NILOREA_COOKIES_HEADER
Structure of a generic LIST container.
long expires
unix expiry timestamp, 0 = session cookie
char * path
path prefix (e.g.
char * domain
domain (e.g.
int http_only
1 = HttpOnly flag was set
LIST * cookies
list of N_COOKIE*
int secure
1 = only sent over HTTPS
pthread_rwlock_t lock
guards cookies for concurrent use
void n_cookiejar_free(N_COOKIE_JAR **jar)
free a cookie jar and all its cookies, then NULL the pointer
void n_cookiejar_add_from_header(N_COOKIE_JAR *jar, const char *set_cookie_value, const char *request_domain)
parse one Set-Cookie value (without the "Set-Cookie:" name) and store it; request_domain/path supply ...
N_STR * n_cookiejar_build_header(N_COOKIE_JAR *jar, const char *domain, const char *path, int is_secure)
build a "name=value; name2=value2" Cookie header value for a request (domain/path/secure/expiry match...
N_COOKIE_JAR * n_cookiejar_new(void)
create an empty cookie jar; free with n_cookiejar_free.
void n_cookiejar_clear(N_COOKIE_JAR *jar)
drop every stored cookie
size_t n_cookiejar_count(N_COOKIE_JAR *jar)
number of cookies currently stored
A box including a string and his lenght.
List structures and definitions.
N_STR and string function declaration.