libfetch 0.0.0
A lightweight asynchronous HTTP/1.1 client library implementing a subset of the WHATWG Fetch API.
Loading...
Searching...
No Matches
Cookie Validation

Validate cookie names and values. More...

Functions

bool cookie_is_valid_name (const char *name)
 Check if cookie name is valid.
 
bool cookie_is_valid_value (const char *value)
 Check if cookie value is valid.
 

Detailed Description

Validate cookie names and values.

Function Documentation

◆ cookie_is_valid_name()

bool cookie_is_valid_name ( const char * name)

Check if cookie name is valid.

Parameters
nameCookie name to validate
Returns
True if name is valid

Cookie names cannot contain control characters or certain special characters.

◆ cookie_is_valid_value()

bool cookie_is_valid_value ( const char * value)

Check if cookie value is valid.

Parameters
valueCookie value to validate
Returns
True if value is valid

Cookie values cannot contain control characters, quotes, or semicolons.