1 Struct N_HTTP_SET_COOKIE
gullradriel edited this page 2026-10-25 10:46:33 +01:00

N_HTTP_SET_COOKIE

Module: HTTP COOKIES: server-side Cookie reading and Set-Cookie building

what a Set-Cookie should carry

#include "n_http_cookie.h"

Public Attributes

Name
const char * value
cookie value, RFC 6265 cookie-octets only (may be "")
int secure
non-zero: Secure
N_HTTP_SAMESITE same_site
SameSite attribute.
const char * path
Path attribute, or NULL.
const char * name
cookie name, an RFC 9110 token
long long max_age
Max-Age in seconds; N_HTTP_COOKIE_SESSION for a session cookie; 0 deletes the cookie (Max-Age=0 plus an Expires in 1970).
int http_only
non-zero: HttpOnly
const char * domain
Domain attribute, or NULL (host-only cookie).

Public Attributes Documentation

variable value

const char * value;

cookie value, RFC 6265 cookie-octets only (may be "")

variable secure

int secure;

non-zero: Secure

variable same_site

N_HTTP_SAMESITE same_site;

SameSite attribute.

variable path

const char * path;

Path attribute, or NULL.

variable name

const char * name;

cookie name, an RFC 9110 token

variable max_age

long long max_age;

Max-Age in seconds; N_HTTP_COOKIE_SESSION for a session cookie; 0 deletes the cookie (Max-Age=0 plus an Expires in 1970).

variable http_only

int http_only;

non-zero: HttpOnly

variable domain

const char * domain;

Domain attribute, or NULL (host-only cookie).