Apache HTTP Server Request Library

#include "apreq.h"
#include "apr_buckets.h"
Go to the source code of this file.
| static APR_INLINE apreq_charset_t apreq_param_charset_get | ( | apreq_param_t * | p | ) | [static] |
Gets the character encoding for this parameter.
| static APR_INLINE apreq_charset_t apreq_param_charset_set | ( | apreq_param_t * | p, | |
| apreq_charset_t | c | |||
| ) | [static] |
Sets the character encoding for this parameter.
| apr_status_t apreq_param_decode | ( | apreq_param_t ** | param, | |
| apr_pool_t * | pool, | |||
| const char * | word, | |||
| apr_size_t | nlen, | |||
| apr_size_t | vlen | |||
| ) |
Url-decodes a name=value pair into a param.
| param | points to the decoded parameter on success | |
| pool | Pool from which the param is allocated. | |
| word | Start of the name=value pair. | |
| nlen | Length of urlencoded name. | |
| vlen | Length of urlencoded value. |
APREQ_ERROR_BADSEQ or APREQ_ERROR_BADCHAR on malformed input.
| char* apreq_param_encode | ( | apr_pool_t * | pool, | |
| const apreq_param_t * | param | |||
| ) |
Url-encodes the param into a name-value pair.
| pool | Pool which allocates the returned string. | |
| param | Param to encode. |
| static APR_INLINE unsigned apreq_param_is_tainted | ( | const apreq_param_t * | p | ) | [static] |
| apreq_param_t* apreq_param_make | ( | apr_pool_t * | p, | |
| const char * | name, | |||
| const apr_size_t | nlen, | |||
| const char * | val, | |||
| const apr_size_t | vlen | |||
| ) |
creates a param from name/value information
| static APR_INLINE void apreq_param_tainted_off | ( | apreq_param_t * | p | ) | [static] |
Turns off the taint flag.
| static APR_INLINE void apreq_param_tainted_on | ( | apreq_param_t * | p | ) | [static] |
Sets the tainted flag.
| apr_array_header_t* apreq_params_as_array | ( | apr_pool_t * | p, | |
| const apr_table_t * | t, | |||
| const char * | key | |||
| ) |
Returns an array of parameters (apreq_param_t *) matching the given key. The key is case-insensitive.
| p | Allocates the returned array. | |
| t | the parameter table returned by apreq_args(), apreq_body() or apreq_params() | |
| key | Null-terminated search key, case insensitive. key==NULL fetches all parameters. |
| const char* apreq_params_as_string | ( | apr_pool_t * | p, | |
| const apr_table_t * | t, | |||
| const char * | key, | |||
| apreq_join_t | mode | |||
| ) |
Returns a ", " -joined string containing all parameters for the requested key, an empty string if none are found. The key is case-insensitive.
| p | Allocates the return string. | |
| t | the parameter table returned by apreq_args(), apreq_body() or apreq_params() | |
| key | Null-terminated parameter name, case insensitive. key==NULL fetches all values. | |
| mode | Join type- see apreq_join(). |
| apr_status_t apreq_parse_query_string | ( | apr_pool_t * | pool, | |
| apr_table_t * | t, | |||
| const char * | qs | |||
| ) |
Parse a url-encoded string into a param table.
| pool | pool used to allocate the param data. | |
| t | table to which the params are added. | |
| qs | Query string to url-decode. |
| const apreq_param_t* apreq_upload | ( | const apr_table_t * | body, | |
| const char * | name | |||
| ) |
Returns the first param in req->body which has both param->v.name matching key (case insensitive) and param->upload != NULL.
| body | parameter table returned by apreq_body() or apreq_params() | |
| name | Parameter name. key == NULL returns first upload. |
| const apr_table_t* apreq_uploads | ( | const apr_table_t * | body, | |
| apr_pool_t * | pool | |||
| ) |
Returns a table of all params in req->body with non-NULL upload brigades.
| body | parameter table returned by apreq_body() or apreq_params() | |
| pool | Pool which allocates the table struct. |
| static APR_INLINE apreq_param_t* apreq_value_to_param | ( | const char * | val | ) | [static] |
Upgrades args and body table values to apreq_param_t structs.