|
Apache HTTPD
|
Classes | |
| struct | ap_cookie_do |
Macros | |
| #define | SET_COOKIE "Set-Cookie" |
| #define | SET_COOKIE2 "Set-Cookie2" |
| #define | DEFAULT_ATTRS "HttpOnly;Secure;Version=1" |
| #define | CLEAR_ATTRS "Version=1" |
Functions | |
| apr_status_t | ap_cookie_write (request_rec *r, const char *name, const char *val, const char *attrs, long maxage,...) |
| apr_status_t | ap_cookie_write2 (request_rec *r, const char *name2, const char *val, const char *attrs2, long maxage,...) |
| apr_status_t | ap_cookie_remove (request_rec *r, const char *name, const char *attrs,...) |
| apr_status_t | ap_cookie_remove2 (request_rec *r, const char *name2, const char *attrs2,...) |
| apr_status_t | ap_cookie_read (request_rec *r, const char *name, const char **val, int remove) |
| apr_status_t | ap_cookie_check_string (const char *string) |
RFC2109 and RFC2965 compliant HTTP cookies can be read from and written to using this set of functions.
| #define CLEAR_ATTRS "Version=1" |
Definition at line 46 of file util_cookies.h.
Definition at line 45 of file util_cookies.h.
Definition at line 43 of file util_cookies.h.
Definition at line 44 of file util_cookies.h.
| apr_status_t ap_cookie_check_string | ( | const char * | string | ) |
Sanity check a given string that it exists, is not empty, and does not contain the special characters '=', ';' and '&'.
It is used to sanity check the cookie names.
Definition at line 283 of file util_cookies.c.
| apr_status_t ap_cookie_read | ( | request_rec * | r, |
| const char * | name, | ||
| const char ** | val, | ||
| int | remove | ||
| ) |
Read a cookie called name, placing its value in val.
Both the Cookie and Cookie2 headers are scanned for the cookie.
If the cookie is duplicated, this function returns APR_EGENERAL. If found, and if remove is non zero, the cookie will be removed from the headers, and thus kept private from the backend.
Definition at line 245 of file util_cookies.c.
| apr_status_t ap_cookie_remove | ( | request_rec * | r, |
| const char * | name, | ||
| const char * | attrs, | ||
| ... | |||
| ) |
Remove an RFC2109 compliant cookie.
| r | The request |
| name | The name of the cookie. |
| attrs | The string containing additional cookie attributes. If NULL, the CLEAR_ATTRS will be used. |
| ... | A varargs array of zero or more (apr_table_t *) tables followed by NULL to which the cookies should be added. |
Remove an RFC2109 compliant cookie.
| r | The request |
| name | The name of the cookie. |
Definition at line 120 of file util_cookies.c.
| apr_status_t ap_cookie_remove2 | ( | request_rec * | r, |
| const char * | name2, | ||
| const char * | attrs2, | ||
| ... | |||
| ) |
Remove an RFC2965 compliant cookie.
| r | The request |
| name2 | The name of the cookie. |
| attrs2 | The string containing additional cookie attributes. If NULL, the CLEAR_ATTRS will be used. |
| ... | A varargs array of zero or more (apr_table_t *) tables followed by NULL to which the cookies should be added. |
Remove an RFC2965 compliant cookie.
| r | The request |
| name2 | The name of the cookie. |
Definition at line 148 of file util_cookies.c.
| apr_status_t ap_cookie_write | ( | request_rec * | r, |
| const char * | name, | ||
| const char * | val, | ||
| const char * | attrs, | ||
| long | maxage, | ||
| ... | |||
| ) |
Write an RFC2109 compliant cookie.
| r | The request |
| name | The name of the cookie. |
| val | The value to place in the cookie. |
| attrs | The string containing additional cookie attributes. If NULL, the DEFAULT_ATTRS will be used. |
| maxage | If non zero, a Max-Age header will be added to the cookie. |
| ... | A varargs array of zero or more (apr_table_t *) tables followed by NULL to which the cookies should be added. |
Write an RFC2109 compliant cookie.
| r | The request |
| name | The name of the cookie. |
| val | The value to place in the cookie. |
| attrs | The string containing additional cookie attributes. If NULL, the DEFAULT_ATTRS will be used. |
| maxage | If non zero, a Max-Age header will be added to the cookie. |
Definition at line 40 of file util_cookies.c.
| apr_status_t ap_cookie_write2 | ( | request_rec * | r, |
| const char * | name2, | ||
| const char * | val, | ||
| const char * | attrs2, | ||
| long | maxage, | ||
| ... | |||
| ) |
Write an RFC2965 compliant cookie.
| r | The request |
| name2 | The name of the cookie. |
| val | The value to place in the cookie. |
| attrs2 | The string containing additional cookie attributes. If NULL, the DEFAULT_ATTRS will be used. |
| maxage | If non zero, a Max-Age header will be added to the cookie. |
| ... | A varargs array of zero or more (apr_table_t *) tables followed by NULL to which the cookies should be added. |
Write an RFC2965 compliant cookie.
| r | The request |
| name2 | The name of the cookie. |
| val | The value to place in the cookie. |
| attrs2 | The string containing additional cookie attributes. If NULL, the DEFAULT_ATTRS will be used. |
| maxage | If non zero, a Max-Age header will be added to the cookie. |
Definition at line 82 of file util_cookies.c.