Apache HTTP Server Request Library
#include "apreq_param.h"
Go to the source code of this file.
|
Value: APREQ_DECLARE_NONSTD(apr_status_t) \ (f) (APREQ_HOOK_ARGS) |
|
Value: APREQ_DECLARE_NONSTD(apr_status_t) \ (f) (APREQ_PARSER_ARGS) |
|
Value: apreq_hook_t *hook, \ apreq_param_t *param, \ apr_bucket_brigade *bb |
|
Value: apreq_parser_t *parser, \ apr_table_t *t, \ apr_bucket_brigade *bb |
|
The callback function of a hook. See apreq_hook_t. |
|
A hook is called by the parser whenever data arrives in a file upload parameter of the request body. You may associate any number of hooks with a parser instance with apreq_parser_add_hook(). |
|
The callback function implementing a request body parser. |
|
A request body parser instance. |
|
Special purpose utility for locating a parameter during parsing. The hook's ctx shoud be initialized to a const char *, which is a pointer to the desired param name. The hook's ctx will be reassigned to the first param found.
|
|
Calls apr_brigade_cleanup on the incoming brigade after passing the brigade to any subsequent hooks. |
|
Returns APREQ_ERROR_GENERAL. Effectively disables mfd parser if a file-upload field is present. |
|
apr_xml_parser hook. It will parse until EOS appears. The parsed document isn't available until parsing has completed successfully. The hook's ctx pointer may be cast as (apr_xml_doc **) to retrieve the parsed document. |
|
Generic parser. No table entries will be added to the req->body table by this parser. The parser creates a dummy apreq_param_t to pass to any configured hooks. If no hooks are configured, the dummy param's bb slot will contain a copy of the request body. It can be retrieved by casting the parser's ctx pointer to (apreq_param_t **). |
|
RFC 2388 multipart/form-data (and XForms 1.0 multipart/related) parser. It will reject any buckets representing preamble and postamble text (this is normal behavior, not an error condition). See apreq_parser_run() for more info on rejected data. |
|
RFC 2396 application/x-www-form-urlencoded parser. |
|
RFC 822 Header parser. It will reject all data after the first CRLF CRLF sequence (an empty line). See apreq_parser_run() for more info on rejected data. |
|
Construct a hook.
|
|
Run the hook with the current parameter and the incoming bucket brigade. The hook may modify the brigade if necessary. Once all hooks have completed, the contents of the brigade will be added to the parameter's bb attribute.
|
|
Fetch the default parser function associated with the given MIME type.
|
|
Add a new hook to the end of the parser's hook list.
|
|
Construct a parser.
|
|
Parse the incoming brigade into a table. Parsers normally consume all the buckets of the brigade during parsing. However parsers may leave "rejected" data in the brigade, even during a successful parse, so callers may need to clean up the brigade themselves (in particular, rejected buckets should not be passed back to the parser again).
|
|
Register a new parsing function with a MIME enctype. Registered parsers are added to apreq_parser()'s internal lookup table.
|