mirror of
https://github.com/apache/httpd.git
synced 2025-08-13 14:40:20 +00:00
Expose "new" ap_parse_form_data() function instead of requiring
mod_request for any module that may want to parse form data... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1072099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -52,56 +52,6 @@ typedef struct {
|
||||
int keep_body_set;
|
||||
} request_dir_conf;
|
||||
|
||||
/**
|
||||
* Structure to store the contents of an HTTP form of the type
|
||||
* application/x-www-form-urlencoded.
|
||||
*
|
||||
* Currently it contains the name as a char* of maximum length
|
||||
* HUGE_STRING_LEN, and a value in the form of a bucket brigade
|
||||
* of arbitrary length.
|
||||
*/
|
||||
typedef struct {
|
||||
const char *name;
|
||||
apr_bucket_brigade *value;
|
||||
} ap_form_pair_t;
|
||||
|
||||
/**
|
||||
* Read the body and parse any form found, which must be of the
|
||||
* type application/x-www-form-urlencoded.
|
||||
*
|
||||
* Name/value pairs are returned in an array, with the names as
|
||||
* strings with a maximum length of HUGE_STRING_LEN, and the
|
||||
* values as bucket brigades. This allows values to be arbitrarily
|
||||
* large.
|
||||
*
|
||||
* All url-encoding is removed from both the names and the values
|
||||
* on the fly. The names are interpreted as strings, while the
|
||||
* values are interpreted as blocks of binary data, that may
|
||||
* contain the 0 character.
|
||||
*
|
||||
* In order to ensure that resource limits are not exceeded, a
|
||||
* maximum size must be provided. If the sum of the lengths of
|
||||
* the names and the values exceed this size, this function
|
||||
* will return HTTP_REQUEST_ENTITY_TOO_LARGE.
|
||||
*
|
||||
* An optional number of parameters can be provided, if the number
|
||||
* of parameters provided exceeds this amount, this function will
|
||||
* return HTTP_REQUEST_ENTITY_TOO_LARGE. If this value is negative,
|
||||
* no limit is imposed, and the number of parameters is in turn
|
||||
* constrained by the size parameter above.
|
||||
*
|
||||
* This function honours any kept_body configuration, and the
|
||||
* original raw request body will be saved to the kept_body brigade
|
||||
* if so configured, just as ap_discard_request_body does.
|
||||
*
|
||||
* NOTE: File upload is not yet supported, but can be without change
|
||||
* to the function call.
|
||||
*/
|
||||
|
||||
APR_DECLARE_OPTIONAL_FN(int, ap_parse_request_form, (request_rec * r, ap_filter_t * f,
|
||||
apr_array_header_t ** ptr,
|
||||
apr_size_t num, apr_size_t size));
|
||||
|
||||
APR_DECLARE_OPTIONAL_FN(void, ap_request_insert_filter, (request_rec * r));
|
||||
|
||||
APR_DECLARE_OPTIONAL_FN(void, ap_request_remove_filter, (request_rec * r));
|
||||
|
Reference in New Issue
Block a user