mod_request.h revision 82632a19f2f9c346fee2b28a65920ba9737b3973
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file mod_request.h
* @brief mod_request private header file
*
* @defgroup MOD_REQUEST mod_request
* @ingroup APACHE_MODS
* @{
*/
#ifndef MOD_REQUEST_H
#define MOD_REQUEST_H
#include "apr.h"
#include "apr_buckets.h"
#include "httpd.h"
#include "util_filter.h"
#ifdef __cplusplus
extern "C" {
#endif
#define KEEP_BODY_FILTER "KEEP_BODY"
#define KEPT_BODY_FILTER "KEPT_BODY"
/**
* Core per-directory configuration.
*/
typedef struct {
int keep_body_set;
/* Handles for core filters */
/* Filter to set aside a kept body on subrequests */
/* Filter to insert a kept body on subrequests */
/**
* Structure to store the contents of an HTTP form of the type
*
* 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;
/**
* Read the body and parse any form found, which must be of the
* type application/x-www-form-urlencoded.
*
* 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.
*/
#ifdef __cplusplus
}
#endif
#endif /* !MOD_REQUEST_H */
/** @} */