Added: websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__cookie_8h.html ============================================================================== --- websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__cookie_8h.html (added) +++ websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__cookie_8h.html Sun May 6 14:18:02 2012 @@ -0,0 +1,594 @@ + + + + libapreq2-2.13: libapreq2: include/apreq_cookie.h File Reference + + + + + +
+

include/apreq_cookie.h File Reference

Cookies and Jars.

+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_tapreq_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_httponly (const apreq_cookie_t *c)
static APR_INLINE void apreq_cookie_httponly_on (apreq_cookie_t *c)
static APR_INLINE void apreq_cookie_httponly_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_tapreq_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)
+


Detailed Description

+Cookies and Jars.

+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. +

+

See also:
http://wp.netscape.com/newsref/std/cookie_spec.html

+http://www.ietf.org/rfc/rfc2109.txt

+http://www.ietf.org/rfc/rfc2964.txt

+http://www.ietf.org/rfc/rfc2965.txt

+

Define Documentation

+ +
+
+ + + + +
#define APREQ_COOKIE_MAX_LENGTH   4096
+
+
+ +

+This macro is deprecated.

+Maximum length of a single Set-Cookie(2) header. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
char* apreq_cookie_as_string (const apreq_cookie_t c,
apr_pool_t p 
)
+
+
+ +

+Returns a string that represents the cookie as it would appear in a valid "Set-Cookie*" header.

+

Parameters:
+ + + +
c cookie.
p pool which allocates the returned string.
+
+
Returns:
header string.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void apreq_cookie_expires (apreq_cookie_t c,
const char *  time_str 
)
+
+
+ +

+Set the Cookie's expiration date.

+

Parameters:
+ + + +
c The cookie.
time_str If NULL, the Cookie's expiration date is unset, making it a session cookie. This means no "expires" or "max-age" attribute will appear in the cookie's serialized form. If time_str is not NULL, the expiration date will be reset to the offset (from now) represented by time_str. The time_str should be in a format that apreq_atoi64t() can understand, namely /[+-]?\d+\s*[YMDhms]/.
+
+
Remarks:
Now time_str may also be a fixed date; see apr_date_parse_rfc() for admissible formats.
+ +
+

+ +

+
+ + + + + + + + + +
static APR_INLINE void apreq_cookie_httponly_off (apreq_cookie_t c  )  [static]
+
+
+ +

+Turns off the cookie's HttpOnly flag. +

+

+ +

+
+ + + + + + + + + +
static APR_INLINE void apreq_cookie_httponly_on (apreq_cookie_t c  )  [static]
+
+
+ +

+Sets the cookie's HttpOnly flag, meaning it is not accessible through client-side script in supported browsers. +

+

+ +

+
+ + + + + + + + + +
static APR_INLINE unsigned apreq_cookie_is_httponly (const apreq_cookie_t c  )  [static]
+
+
+ +

+

Returns:
1 if the HttpOnly flag is set, 0 otherwise.
+ +
+

+ +

+
+ + + + + + + + + +
static APR_INLINE unsigned apreq_cookie_is_secure (const apreq_cookie_t c  )  [static]
+
+
+ +

+

Returns:
1 if the secure flag is set, 0 otherwise.
+ +
+

+ +

+
+ + + + + + + + + +
static APR_INLINE unsigned apreq_cookie_is_tainted (const apreq_cookie_t c  )  [static]
+
+
+ +

+

Returns:
1 if the taint flag is set, 0 otherwise.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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 
)
+
+
+ +

+Returns a new cookie, made from the argument list.

+

Parameters:
+ + + + + + +
pool Pool which allocates the cookie.
name The cookie's name.
nlen Length of name.
value The cookie's value.
vlen Length of value.
+
+
Returns:
the new cookie
+ +
+

+ +

+
+ + + + + + + + + +
static APR_INLINE void apreq_cookie_secure_off (apreq_cookie_t c  )  [static]
+
+
+ +

+Turns off the cookie's secure flag. +

+

+ +

+
+ + + + + + + + + +
static APR_INLINE void apreq_cookie_secure_on (apreq_cookie_t c  )  [static]
+
+
+ +

+Sets the cookie's secure flag, meaning it only comes back over an SSL-encrypted connction. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int apreq_cookie_serialize (const apreq_cookie_t c,
char *  buf,
apr_size_t  len 
)
+
+
+ +

+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.

+

Parameters:
+ + + + +
c cookie.
buf storage location for the result.
len size of buf's storage area.
+
+
Returns:
size of resulting header string.
+ +
+

+ +

+
+ + + + + + + + + +
static APR_INLINE void apreq_cookie_tainted_off (apreq_cookie_t c  )  [static]
+
+
+ +

+Turns off the cookie's tainted flag. +

+

+ +

+
+ + + + + + + + + +
static APR_INLINE void apreq_cookie_tainted_on (apreq_cookie_t c  )  [static]
+
+
+ +

+Sets the cookie's tainted flag. +

+

+ +

+
+ + + + + + + + + +
static APR_INLINE unsigned apreq_cookie_version (const apreq_cookie_t c  )  [static]
+
+
+ +

+

Returns:
1 if this is an RFC cookie, 0 if its a Netscape cookie.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
static APR_INLINE void apreq_cookie_version_set (apreq_cookie_t c,
unsigned  v 
) [static]
+
+
+ +

+Sets the cookie's protocol version. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
apr_status_t apreq_parse_cookie_header (apr_pool_t pool,
apr_table_t jar,
const char *  header 
)
+
+
+ +

+Parse a cookie header and store the cookies in an apr_table_t.

+

Parameters:
+ + + + +
pool pool which allocates the cookies
jar table where parsed cookies are stored
header the header value
+
+
Returns:
APR_SUCCESS.

+APREQ_ERROR_BADSEQ if an unparseable character sequence appears.

+APREQ_ERROR_MISMATCH if an rfc-cookie attribute appears in a netscape cookie header.

+APR_ENOTIMPL if an unrecognized rfc-cookie attribute appears.

+APREQ_ERROR_NOTOKEN if a required token was not present.

+APREQ_ERROR_BADCHAR if an unexpected token was present.

+ +
+

+ +

+
+ + + + + + + + + +
static APR_INLINE apreq_cookie_t* apreq_value_to_cookie (const char *  val  )  [static]
+
+
+ +

+Upgrades a jar's table values to apreq_cookie_t structs. +

+

+

+ + + Added: websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__error_8h-source.html ============================================================================== --- websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__error_8h-source.html (added) +++ websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__error_8h-source.html Sun May 6 14:18:02 2012 @@ -0,0 +1,114 @@ + + + + libapreq2-2.13: libapreq2: include/apreq_error.h Source File + + + + + + + + Added: websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__error_8h.html ============================================================================== --- websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__error_8h.html (added) +++ websites/staging/httpd/trunk/content/apreq/docs/libapreq2/apreq__error_8h.html Sun May 6 14:18:02 2012 @@ -0,0 +1,417 @@ + + + + libapreq2-2.13: libapreq2: include/apreq_error.h File Reference + + + + + +
+

include/apreq_error.h File Reference

Error status codes.

+Define the APREQ_ error codes. More... +

+#include "apr_errno.h"
+#include "apreq.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define APR_EBADARG   APR_BADARG
#define APREQ_ERROR_GENERAL   APR_OS_START_USERERR
#define APREQ_ERROR_TAINTED   (APREQ_ERROR_GENERAL + 1)
#define APREQ_ERROR_INTERRUPT   (APREQ_ERROR_GENERAL + 2)
#define APREQ_ERROR_BADDATA   (APREQ_ERROR_GENERAL + 10)
#define APREQ_ERROR_BADCHAR   (APREQ_ERROR_BADDATA + 1)
#define APREQ_ERROR_BADSEQ   (APREQ_ERROR_BADDATA + 2)
#define APREQ_ERROR_BADATTR   (APREQ_ERROR_BADDATA + 3)
#define APREQ_ERROR_BADHEADER   (APREQ_ERROR_BADDATA + 4)
#define APREQ_ERROR_BADUTF8   (APREQ_ERROR_BADDATA + 5)
#define APREQ_ERROR_NODATA   (APREQ_ERROR_GENERAL + 20)
#define APREQ_ERROR_NOTOKEN   (APREQ_ERROR_NODATA + 1)
#define APREQ_ERROR_NOATTR   (APREQ_ERROR_NODATA + 2)
#define APREQ_ERROR_NOHEADER   (APREQ_ERROR_NODATA + 3)
#define APREQ_ERROR_NOPARSER   (APREQ_ERROR_NODATA + 4)
#define APREQ_ERROR_MISMATCH   (APREQ_ERROR_GENERAL + 30)
#define APREQ_ERROR_OVERLIMIT   (APREQ_ERROR_MISMATCH + 1)
#define APREQ_ERROR_UNDERLIMIT   (APREQ_ERROR_MISMATCH + 2)
#define APREQ_ERROR_NOTEMPTY   (APREQ_ERROR_MISMATCH + 3)

Functions

char * apreq_strerror (apr_status_t s, char *buf, apr_size_t bufsize)
+


Detailed Description

+Error status codes.

+Define the APREQ_ error codes. +

+


Define Documentation

+ +
+
+ + + + +
#define APR_EBADARG   APR_BADARG
+
+
+ +

+Bad Arguments return value

See also:
APR_BADARG
+ +
+

+ +

+
+ + + + +
#define APREQ_ERROR_BADATTR   (APREQ_ERROR_BADDATA + 3)
+
+
+ +

+Invalid attribute. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_BADCHAR   (APREQ_ERROR_BADDATA + 1)
+
+
+ +

+Invalid character. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_BADDATA   (APREQ_ERROR_GENERAL + 10)
+
+
+ +

+Invalid input data. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_BADHEADER   (APREQ_ERROR_BADDATA + 4)
+
+
+ +

+Invalid header. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_BADSEQ   (APREQ_ERROR_BADDATA + 2)
+
+
+ +

+Invalid byte sequence. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_BADUTF8   (APREQ_ERROR_BADDATA + 5)
+
+
+ +

+Invalid utf8 encoding. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_GENERAL   APR_OS_START_USERERR
+
+
+ +

+Internal apreq error. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_INTERRUPT   (APREQ_ERROR_GENERAL + 2)
+
+
+ +

+Parsing interrupted. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_MISMATCH   (APREQ_ERROR_GENERAL + 30)
+
+
+ +

+Conflicting information. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_NOATTR   (APREQ_ERROR_NODATA + 2)
+
+
+ +

+Missing attribute. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_NODATA   (APREQ_ERROR_GENERAL + 20)
+
+
+ +

+Missing input data. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_NOHEADER   (APREQ_ERROR_NODATA + 3)
+
+
+ +

+Missing header. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_NOPARSER   (APREQ_ERROR_NODATA + 4)
+
+
+ +

+Missing parser. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_NOTEMPTY   (APREQ_ERROR_MISMATCH + 3)
+
+
+ +

+Setting already configured. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_NOTOKEN   (APREQ_ERROR_NODATA + 1)
+
+
+ +

+Missing required token. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_OVERLIMIT   (APREQ_ERROR_MISMATCH + 1)
+
+
+ +

+Exceeds configured maximum limit. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_TAINTED   (APREQ_ERROR_GENERAL + 1)
+
+
+ +

+Attempted to perform unsafe action with tainted data. +

+

+ +

+
+ + + + +
#define APREQ_ERROR_UNDERLIMIT   (APREQ_ERROR_MISMATCH + 2)
+
+
+ +

+Below configured minimum limit. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
char* apreq_strerror (apr_status_t  s,
char *  buf,
apr_size_t  bufsize 
)
+
+
+ +

+apreq's wrapper around apr_strerror(); recognizes APREQ_ERROR_* status codes. +

+

+

+ + +