Low-level domain and path matching functions.
More...
Low-level domain and path matching functions.
◆ cookie_canonicalize_domain()
char * cookie_canonicalize_domain |
( |
const char * | domain | ) |
|
Convert domain to canonical lowercase form.
- Parameters
-
- Returns
- Canonicalized domain (caller must free), or NULL on error
◆ cookie_default_path()
char * cookie_default_path |
( |
const char * | url | ) |
|
Extract default path from URL.
- Parameters
-
- Returns
- Default path for cookies (caller must free)
free(path);
char * cookie_default_path(const char *url)
Extract default path from URL.
Definition cookie.c:1132
◆ cookie_domain_matches()
bool cookie_domain_matches |
( |
const char * | cookie_domain, |
|
|
const char * | request_domain ) |
Check if cookie domain matches request domain.
- Parameters
-
cookie_domain | Cookie's domain attribute |
request_domain | Request's domain |
- Returns
- True if domain matches
bool cookie_domain_matches(const char *cookie_domain, const char *request_domain)
Check if cookie domain matches request domain.
Definition cookie.c:1063
◆ cookie_is_public_suffix()
bool cookie_is_public_suffix |
( |
const char * | domain | ) |
|
Check if domain is a public suffix.
- Parameters
-
- Returns
- True if domain is a public suffix (like .com, .co.uk)
Prevents cookies from being set on top-level domains.
◆ cookie_path_matches()
bool cookie_path_matches |
( |
const char * | cookie_path, |
|
|
const char * | request_path ) |
Check if cookie path matches request path.
- Parameters
-
cookie_path | Cookie's path attribute |
request_path | Request's path |
- Returns
- True if path matches
bool cookie_path_matches(const char *cookie_path, const char *request_path)
Check if cookie path matches request path.
Definition cookie.c:1092