#include <time.h>
#include <cgi/cgi_config.h>
#include <cgi/headers.h>
Functions | |
| int | cookie_set (struct s_cgi_context *, char *, char *, time_t, char *) |
| Set the cookie value. | |
| int | cookie_unset (struct s_cgi_context *, char *) |
| Clear cookie. | |
| const char * | cookie_get (struct s_cgi_context *, char *) |
| Get the cookie value. | |
Cookies handling functions.
| const char* cookie_get | ( | t_cgi_context * | ctx, | |
| char * | name | |||
| ) |
Get the cookie value.
Returns value of the given cookie.
| ctx | pointer to existing CGI context (t_cgi_context *). | |
| name | cookie name. |
| int cookie_set | ( | t_cgi_context * | ctx, | |
| char * | name, | |||
| char * | value, | |||
| time_t | timeout, | |||
| char * | path | |||
| ) |
Set the cookie value.
Sets value of cookie.
| ctx | pointer to existing CGI context (t_cgi_context *). | |
| name | cookie name. | |
| value | cookie value. | |
| timeout | cookie timeout. | |
| path | cookie path (can be NULL; defaults to "/"). |
| int cookie_unset | ( | t_cgi_context * | ctx, | |
| char * | name | |||
| ) |
Clear cookie.
Clears the cookie from client's UA.
| ctx | pointer to existing CGI context (t_cgi_context *). | |
| name | cookie name. |
1.5.5