Apache HTTP Server Request Library
apreq_cookie.h describes a common server-side API for request (incoming) and response (outgoing) cookies. It aims towards compliance with the standard cookie specifications listed below. More...
#include "apreq.h"
#include "apr_time.h"
Go to the source code of this file.
Data Structures | |
struct | apreq_cookie_t |
Cookie type, supporting both Netscape and RFC cookie specifications. More... | |
Defines | |
#define | APREQ_COOKIE_MAX_LENGTH 4096 |
Functions | |
static APR_INLINE apreq_cookie_t * | apreq_value_to_cookie (const char *val) |
static APR_INLINE unsigned | apreq_cookie_version (const apreq_cookie_t *c) |
static APR_INLINE void | apreq_cookie_version_set (apreq_cookie_t *c, unsigned v) |
static APR_INLINE unsigned | apreq_cookie_is_secure (const apreq_cookie_t *c) |
static APR_INLINE void | apreq_cookie_secure_on (apreq_cookie_t *c) |
static APR_INLINE void | apreq_cookie_secure_off (apreq_cookie_t *c) |
static APR_INLINE unsigned | apreq_cookie_is_tainted (const apreq_cookie_t *c) |
static APR_INLINE void | apreq_cookie_tainted_on (apreq_cookie_t *c) |
static APR_INLINE void | apreq_cookie_tainted_off (apreq_cookie_t *c) |
apr_status_t | apreq_parse_cookie_header (apr_pool_t *pool, apr_table_t *jar, const char *header) |
apreq_cookie_t * | apreq_cookie_make (apr_pool_t *pool, const char *name, const apr_size_t nlen, const char *value, const apr_size_t vlen) |
char * | apreq_cookie_as_string (const apreq_cookie_t *c, apr_pool_t *p) |
int | apreq_cookie_serialize (const apreq_cookie_t *c, char *buf, apr_size_t len) |
void | apreq_cookie_expires (apreq_cookie_t *c, const char *time_str) |
apreq_cookie.h describes a common server-side API for request (incoming) and response (outgoing) cookies. It aims towards compliance with the standard cookie specifications listed below.
http://www.ietf.org/rfc/rfc2109.txt
|
|
|
Returns a string that represents the cookie as it would appear in a valid "Set-Cookie*" header.
|
|
Set the Cookie's expiration date.
|
|
|
|
|
|
Returns a new cookie, made from the argument list.
|
|
Turns off the cookie's secure flag. |
|
Sets the cookie's secure flag, meaning it only comes back over an SSL-encrypted connction. |
|
Same functionality as apreq_cookie_as_string. Stores the string representation in buf, using up to len bytes in buf as storage. The return value has the same semantics as that of apr_snprintf, including the special behavior for a "len = 0" argument.
|
|
Turns off the cookie's tainted flag. |
|
Sets the cookie's tainted flag. |
|
|
|
Sets the cookie's protocol version. |
|
Parse a cookie header and store the cookies in an apr_table_t.
|
|
Upgrades a jar's table values to apreq_cookie_t structs. |