httpd.h revision f0eaa043a2c80e21c1e9eace464378f52c818b7c
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* Licensed to the Apache Software Foundation (ASF) under one or more
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * contributor license agreements. See the NOTICE file distributed with
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * this work for additional information regarding copyright ownership.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * The ASF licenses this file to You under the Apache License, Version 2.0
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * (the "License"); you may not use this file except in compliance with
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * the License. You may obtain a copy of the License at
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * http://www.apache.org/licenses/LICENSE-2.0
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Unless required by applicable law or agreed to in writing, software
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * distributed under the License is distributed on an "AS IS" BASIS,
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * See the License for the specific language governing permissions and
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * limitations under the License.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @brief HTTP Daemon routines
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @defgroup APACHE Apache HTTP Server
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Top level group of which all other groups are a member
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @defgroup APACHE_MODS Loadable modules
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Top level group for modules
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @defgroup APACHE_OS Operating System Specific
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @defgroup APACHE_INTERNAL Internal interfaces
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @defgroup APACHE_CORE Core routines
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @defgroup APACHE_CORE_DAEMON HTTP Daemon Routine
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* XXX - We need to push more stuff to other .h files, or even .c files, to
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * make this file smaller
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* Headers in which EVERYONE has an interest... */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* Note: apr_uri.h is also included, see below */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* ----------------------------- config dir ------------------------------ */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Define this to be the default server home dir. Most things later in this
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * file with a relative pathname will have this added.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Set default for OS/2 file system */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Set default for Windows file system */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Set the default for NetWare */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Set for all other OSs */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#endif /* HTTPD_ROOT */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * --------- You shouldn't have to edit anything below this line ----------
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Any modifications to any defaults not defined above should be done in the
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * respective configuration file.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Default location of documents. Can be overridden by the DocumentRoot
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* Set default for OS/2 file system */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* Set default for non OS/2 file system */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCUMENT_LOCATION HTTPD_ROOT "/htdocs"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#endif /* DOCUMENT_LOCATION */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Maximum number of dynamically loaded modules */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Default administrator's address */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The name of the log files */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#endif /* DEFAULT_ERRORLOG */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Define this to be what your per-directory security files are called */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* Set default for OS/2 file system */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#endif /* DEFAULT_ACCESS_FNAME */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The name of the server config file */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The default path for CGI scripts if none is currently set */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The path to the suExec wrapper, can be overridden in Configuration */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The timeout for waiting for messages */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The timeout for waiting for keepalive timeout until next request */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The number of requests to entertain per connection */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Limits on the size of various request items. These limits primarily
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * exist to prevent simple denial-of-service attacks on a server based
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * on misuse of the protocol. The recommended values will depend on the
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * nature of the server resources -- CGI scripts and database backends
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * might require large values, but most servers could get by with much
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * smaller limits than we use below. The request message body size can
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * be limited by the per-dir config directive LimitRequestBody.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Internal buffer sizes are two bytes more than the DEFAULT_LIMIT_REQUEST_LINE
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * and DEFAULT_LIMIT_REQUEST_FIELDSIZE below, which explains the 8190.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * These two limits can be lowered or raised by the server config
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * directives LimitRequestLine and LimitRequestFieldsize, respectively.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * DEFAULT_LIMIT_REQUEST_FIELDS can be modified or disabled (set = 0) by
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * the server config directive LimitRequestFields.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** default limit on bytes in Request-Line (Method+URI+HTTP-version) */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** default limit on bytes in any one header field */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** default limit on number of request header fields */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * The default default character set name to add if AddDefaultCharset is
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * enabled. Overridden with AddDefaultCharsetName.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DEFAULT_ADD_DEFAULT_CHARSET_NAME "iso-8859-1"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** default HTTP Server protocol */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* ------------------ stuff that modules are allowed to look at ----------- */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Define this to be what your HTML directory content files are called */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The name of the MIME types file */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define AP_TYPES_CONFIG_FILE "conf/mime.types"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Define the HTML doctype strings centrally.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** HTML 2.0 Doctype */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCTYPE_HTML_2_0 "<!DOCTYPE HTML PUBLIC \"-//IETF//" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "DTD HTML 2.0//EN\">\n"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** HTML 3.2 Doctype */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCTYPE_HTML_3_2 "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "DTD HTML 3.2 Final//EN\">\n"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** HTML 4.0 Strict Doctype */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCTYPE_HTML_4_0S "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "DTD HTML 4.0//EN\"\n" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "\"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** HTML 4.0 Transitional Doctype */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCTYPE_HTML_4_0T "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "DTD HTML 4.0 Transitional//EN\"\n" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** HTML 4.0 Frameset Doctype */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCTYPE_HTML_4_0F "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "DTD HTML 4.0 Frameset//EN\"\n" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "\"http://www.w3.org/TR/REC-html40/frameset.dtd\">\n"
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** XHTML 1.0 Strict Doctype */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCTYPE_XHTML_1_0S "<!DOCTYPE html PUBLIC \"-//W3C//" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "DTD XHTML 1.0 Strict//EN\"\n" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "xhtml1-strict.dtd\">\n"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** XHTML 1.0 Transitional Doctype */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCTYPE_XHTML_1_0T "<!DOCTYPE html PUBLIC \"-//W3C//" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "DTD XHTML 1.0 Transitional//EN\"\n" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "xhtml1-transitional.dtd\">\n"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** XHTML 1.0 Frameset Doctype */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DOCTYPE_XHTML_1_0F "<!DOCTYPE html PUBLIC \"-//W3C//" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "DTD XHTML 1.0 Frameset//EN\"\n" \
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann "xhtml1-frameset.dtd\">"
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Internal representation for a HTTP protocol number, e.g., HTTP/1.1 */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Major part of HTTP protocol */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define HTTP_VERSION_MAJOR(number) ((number)/1000)
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Minor part of HTTP protocol */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define HTTP_VERSION_MINOR(number) ((number)%1000)
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* -------------- Port number for server running standalone --------------- */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** default HTTP Port */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** default HTTPS Port */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Check whether @a port is the default port for the request @a r.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @param port The port number
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @param r The request
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @see #ap_default_port
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define ap_is_default_port(port,r) ((port) == ap_default_port(r))
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Get the default port for a request (which depends on the scheme).
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @param r The request
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define ap_default_port(r) ap_run_default_port(r)
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Get the scheme for a request.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @param r The request
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define ap_http_scheme(r) ap_run_http_scheme(r)
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The default string length */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The length of a Huge string */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The size of the server's internal read-write buffers */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The max number of regex captures that can be expanded by ap_pregsub */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * APR_HAS_LARGE_FILES introduces the problem of spliting sendfile into
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * mutiple buckets, no greater than MAX(apr_size_t), and more granular
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * than that in case the brigade code/filters attempt to read it directly.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * ### 16mb is an invention, no idea if it is reasonable.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * MPM child process exit status values
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * The MPM parent process may check the status to see if special
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * error handling is required.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** a normal exit */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** A fatal error arising during the server's init sequence */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The child died during its init sequence */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * The child exited due to a resource shortage.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * The parent should limit the rate of forking until
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * the situation is resolved.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * A fatal error, resulting in the whole server aborting.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * If a child exits with this error, the parent process
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * considers this a server-wide fatal error and aborts.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Stuff marked #AP_DECLARE is part of the API, and intended for use
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * by modules. Its purpose is to allow us to add attributes that
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * particular platforms or compilers require to every exported function.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Stuff marked #AP_DECLARE_NONSTD is part of the API, and intended for
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * use by modules. The difference between #AP_DECLARE and
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * #AP_DECLARE_NONSTD is that the latter is required for any functions
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * which use varargs or are used via indirect function call. This
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * is to accomodate the two calling conventions in windows dlls.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * modules should not use functions marked AP_CORE_DECLARE
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * modules should not use functions marked AP_CORE_DECLARE_NONSTD
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann# define AP_CORE_DECLARE_NONSTD AP_DECLARE_NONSTD
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @defgroup APACHE_APR_STATUS_T HTTPD specific values of apr_status_t
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define AP_START_USERERR (APR_OS_START_USERERR + 2000)
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** The function declines to handle the request */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @brief The numeric version information is broken out into fields within this
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmanntypedef struct {
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann const char *add_string; /**< additional string like "-dev" */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * Return httpd's version information in a numeric form.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @param version Pointer to a version structure for returning the version
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * information.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel HoltmannAP_DECLARE(void) ap_get_server_revision(ap_version_t *version);
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Get the server banner in a form suitable for sending over the
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * network, with the level of information controlled by the
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * ServerTokens directive.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @return The server banner
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel HoltmannAP_DECLARE(const char *) ap_get_server_banner(void);
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Get the server description in a form suitable for local displays,
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * status reports, or logging. This includes the detailed server
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * version and information about some modules. It is not affected
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * by the ServerTokens directive.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @return The server description
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel HoltmannAP_DECLARE(const char *) ap_get_server_description(void);
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Add a component to the server description and banner strings
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @param pconf The pool to allocate the component from
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @param component The string to add
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel HoltmannAP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component);
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * Get the date a time that the server was built
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @return The server build time string
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel HoltmannAP_DECLARE(const char *) ap_get_server_built(void);
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/* non-HTTP status codes returned by hooks */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define OK 0 /**< Module has handled this stage. */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DECLINED -1 /**< Module declines to handle */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define DONE -2 /**< Module has served the response completely
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * - it's safe to die() with no more output
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define SUSPENDED -3 /**< Module will handle the remainder of the request.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * The core will never invoke the request again, */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Returned by the bottom-most filter if no data was written.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @see ap_pass_brigade(). */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Returned by the bottom-most filter if no data was read.
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * @see ap_get_brigade(). */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** Returned by any filter if the filter chain encounters an error
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * and has already dealt with the error response.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * @defgroup HTTP_Status HTTP Status Codes
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * The size of the static status_lines array in http_protocol.c for
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * storing all of the potential response status-lines (a sparse table).
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * When adding a new code here add it to status_lines as well.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann * A future version should dynamically generate the apr_table_t at startup.
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** is the status code informational */
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define ap_is_HTTP_INFO(x) (((x) >= 100)&&((x) < 200))
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** is the status code OK ?*/
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann#define ap_is_HTTP_SUCCESS(x) (((x) >= 200)&&((x) < 300))
94f5bbc626f2a4102debd9b17c964170a887cb49Marcel Holtmann/** is the status code a redirect */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define ap_is_HTTP_REDIRECT(x) (((x) >= 300)&&((x) < 400))
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** is the status code a error (client or server) */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define ap_is_HTTP_ERROR(x) (((x) >= 400)&&((x) < 600))
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** is the status code a client error */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define ap_is_HTTP_CLIENT_ERROR(x) (((x) >= 400)&&((x) < 500))
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** is the status code a server error */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define ap_is_HTTP_SERVER_ERROR(x) (((x) >= 500)&&((x) < 600))
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** is the status code a (potentially) valid response code? */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define ap_is_HTTP_VALID_RESPONSE(x) (((x) >= 100)&&((x) < 600))
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** should the status code drop the connection */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @defgroup Methods List of Methods recognized by the server
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @ingroup APACHE_CORE_DAEMON
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @brief Methods recognized (but not necessarily handled) by the server.
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * These constants are used in bit shifting masks of size int, so it is
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * unsafe to have more methods than bits in an int. HEAD == M_GET.
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * This list must be tracked by the list in http_protocol.c in routine
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * ap_method_name_of().
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define M_PATCH 7 /** no rfc(!) ### remove this one? */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define M_VERSION_CONTROL 15 /** RFC 3253: WebDAV Versioning */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * METHODS needs to be equal to the number of bits
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * we are using for limit masks.
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * The method mask bit to shift for anding with a bitmask.
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** @see ap_method_list_t */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmanntypedef struct ap_method_list_t ap_method_list_t;
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @struct ap_method_list_t
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @brief Structure for handling HTTP methods.
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * Methods known to the server are accessed via a bitmask shortcut;
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * extension methods are handled by an array.
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** The bitmask used for known methods */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** the array used for extension methods */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @defgroup module_magic Module Magic mime types
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/** Magic for mod_cgi[d] */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define CGI_MAGIC_TYPE "application/x-httpd-cgi"
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Magic for mod_include */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define INCLUDES_MAGIC_TYPE "text/x-server-parsed-html"
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Magic for mod_include */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define INCLUDES_MAGIC_TYPE3 "text/x-server-parsed-html3"
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Magic for mod_dir */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define DIR_MAGIC_TYPE "httpd/unix-directory"
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Default for r->handler if no content-type set by type_checker */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#define AP_IS_DEFAULT_HANDLER_NAME(x) (*x == '\0')
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/* Just in case your linefeed isn't the one the other end is expecting. */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** linefeed */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** carrige return */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** carrige return /Line Feed Combo */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#else /* APR_CHARSET_EBCDIC */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/* For platforms using the EBCDIC charset, the transition ASCII->EBCDIC is done
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * in the buff package (bread/bputs/bwrite). Everywhere else, we use
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * "native EBCDIC" CR and NL characters. These are therefore
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * '\r' and '\n'.
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann#endif /* APR_CHARSET_EBCDIC */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Useful for common code with either platform charset. */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @defgroup values_request_rec_body Possible values for request_rec.read_body
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * Possible values for request_rec.read_body (set by handling module):
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Send 413 error if message has any body */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Send 411 error if body without Content-Length */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** If chunked, remove the chunks for me. */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** @} // values_request_rec_body */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @defgroup values_request_rec_used_path_info Possible values for request_rec.used_path_info
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @ingroup APACHE_CORE_DAEMON
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * Possible values for request_rec.used_path_info:
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Accept the path_info from the request */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Return a 404 error if path_info was given */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** Module may chose to use the given path_info */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann/** @} // values_request_rec_used_path_info */
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * Things which may vary per file-lookup WITHIN a request ---
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * e.g., state of MIME config. Basically, the name of an object, info
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * about the object, and any other info we may ahve which may need to
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * change as we go poking around looking for it (e.g., overridden by
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * .htaccess files).
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * Note how the default state of almost all these things is properly
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * zero, so that allocating it with pcalloc does the right thing without
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * a whole lot of hairy initialization... so long as we are willing to
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * make the (fairly) portable assumption that the bit pattern of a NULL
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * pointer is, in fact, zero.
5476ad087c0f2d45ab0dab1bab9ef3e9d70418bcMarcel Holtmann * @brief This represents the result of calling htaccess; these are cached for
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * each request.
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** the directory to which this applies */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** the overrides allowed for the .htaccess file */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** the override options allowed for the .htaccess file */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Table of allowed directives for override */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** the configuration directives */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** the next one, or NULL if no more; N.B. never change this */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/* The following four types define a hierarchy of activities, so that
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * given a request_rec r you can write r->connection->server->process
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * to get to the process_rec. While this reduces substantially the
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * number of arguments that various hooks require beware that in
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * threaded versions of the server you must consider multiplexing
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/** A structure that represents one process */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/** A structure that represents a virtual server */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/** A structure that represents one connection */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/** A structure that represents the current request */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/** A structure that represents the status of the current connection */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/* ### would be nice to not include this from httpd.h ... */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann/* This comes after we have defined the request_rec type */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * @brief A structure that represents one process
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Global pool. Cleared upon normal exit */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Configuration pool. Cleared upon restart */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** The program name used to execute the program */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** The command line arguments */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann const char * const *argv;
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Number of command line arguments passed to the program */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * @brief A structure that represents the current request
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** The pool associated with the request */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** The connection to the client */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** The virtual host for this request */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Pointer to the redirected request if this is an external redirect */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Pointer to the previous request if this is an internal redirect */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Pointer to the main request if this is a sub-request
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /* Info about the request itself... we begin with stuff that only
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * protocol.c should ever touch...
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** First line of request */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** HTTP/0.9, "simple" request (e.g. GET /foo\n w/no headers) */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** A proxy request (calculated during post_read_request/translate_name)
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * possible values PROXYREQ_NONE, PROXYREQ_PROXY, PROXYREQ_REVERSE,
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * PROXYREQ_RESPONSE
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** HEAD request, as opposed to GET */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Protocol version number of protocol; 1.1 = 1001 */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Protocol string, as given to us, or HTTP/0.9 */
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Host, as set by full URI or Host: header.
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann * For literal IPv6 addresses, this does NOT include the surrounding [ ]
c6f3f5b4b3ec439ae911ca0644237d96fd31893eMarcel Holtmann /** Time when the request started */
0234c599218518b1eb478d64d9883ba46e4ce5d8Marcel Holtmann /** Status line, if set by script */
0234c599218518b1eb478d64d9883ba46e4ce5d8Marcel Holtmann /** Status line */
0234c599218518b1eb478d64d9883ba46e4ce5d8Marcel Holtmann /* Request method, two ways; also, protocol, etc.. Outside of protocol.c,
0234c599218518b1eb478d64d9883ba46e4ce5d8Marcel Holtmann * look, but don't touch.
0234c599218518b1eb478d64d9883ba46e4ce5d8Marcel Holtmann /** M_GET, M_POST, etc. */
0234c599218518b1eb478d64d9883ba46e4ce5d8Marcel Holtmann /** Request method (eg. GET, HEAD, POST, etc.) */
0234c599218518b1eb478d64d9883ba46e4ce5d8Marcel Holtmann * 'allowed' is a bitvector of the allowed methods.
0234c599218518b1eb478d64d9883ba46e4ce5d8Marcel Holtmann * A handler must ensure that the request method is one that
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * it is capable of handling. Generally modules should DECLINE
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * any request methods they do not handle. Prior to aborting the
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * handler like this the handler should set r->allowed to the list
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * of methods that it is willing to handle. This bitvector is used
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * to construct the "Allow:" header required for OPTIONS requests,
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * and HTTP_METHOD_NOT_ALLOWED and HTTP_NOT_IMPLEMENTED status codes.
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * Since the default_handler deals with OPTIONS, all modules can
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * usually decline to deal with OPTIONS. TRACE is always allowed,
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * modules don't need to set it explicitly.
c4a3a17ee919e8b1197328394709edfe36d8b710Marcel Holtmann * Since the default_handler will always handle a GET, a
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann * module which does *not* implement GET should probably return
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann * HTTP_METHOD_NOT_ALLOWED. Unfortunately this means that a Script GET
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann * handler can't be installed by mod_actions.
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann /** Array of extension methods */
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann /** List of allowed methods */
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann /** byte count in stream is for body */
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann /** body byte count, for easy access */
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann /** Last modified time of the requested resource */
43d9c2b5848b1363b659c38443c1c94db57415fdMarcel Holtmann /* HTTP/1.1 connection-level features */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** The Range: header */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** The "real" content length */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** sending chunked transfer-coding */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** Method for reading the request body
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann * (eg. REQUEST_CHUNKED_ERROR, REQUEST_NO_BODY,
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann * REQUEST_CHUNKED_DECHUNK, etc...) */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** reading chunked transfer-coding */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** is client waiting for a 100 response? */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** The optional kept body of the request. */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** For ap_body_to_table(): parsed body */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /* XXX: ap_body_to_table has been removed. Remove body_table too or
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann * XXX: keep it to reintroduce ap_body_to_table without major bump? */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** Remaining bytes left to read from the request body */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /** Number of bytes that have been read from the request body */
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann /* MIME header environments, in and out. Also, an array containing
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann * environment variables to be passed to subprocesses, so people can
4b28cdeb2332cfbd3f5172b43a2f5f534b7e6e57Marcel Holtmann * write modules to add to that environment.
e525326bd07ebf3cabcfd730bc479166723f2d44Marcel Holtmann * The difference between headers_out and err_headers_out is that the
e525326bd07ebf3cabcfd730bc479166723f2d44Marcel Holtmann * latter are printed even on error, and persist across internal redirects
e525326bd07ebf3cabcfd730bc479166723f2d44Marcel Holtmann * (so the headers printed for ErrorDocument handlers will have them).
e525326bd07ebf3cabcfd730bc479166723f2d44Marcel Holtmann * The 'notes' apr_table_t is for notes from one module to another, with no
e525326bd07ebf3cabcfd730bc479166723f2d44Marcel Holtmann * other set purpose in mind...
f401e2b24ba17452f9655993a6dedefdffe06d23Marcel Holtmann /** MIME header environment from the request */
f401e2b24ba17452f9655993a6dedefdffe06d23Marcel Holtmann /** MIME header environment for the response */
f401e2b24ba17452f9655993a6dedefdffe06d23Marcel Holtmann /** MIME header environment for the response, printed even on errors and
f401e2b24ba17452f9655993a6dedefdffe06d23Marcel Holtmann * persist across internal redirects */
f401e2b24ba17452f9655993a6dedefdffe06d23Marcel Holtmann /** Array of environment variables to be used for sub processes */
f401e2b24ba17452f9655993a6dedefdffe06d23Marcel Holtmann /** Notes from one module to another */
const char *content_encoding;
char *vlist_validator;
char *user;
char *ap_auth_type;
char *unparsed_uri;
char *uri;
char *filename;
char *canonical_filename;
char *path_info;
char *args;
int used_path_info;
int eos_sent;
const char *log_id;
int no_cache;
int no_local_copy;
char *useragent_ip;
struct conn_rec {
/** used by http_vhost.c */
void *vhost_lookup_data;
char *client_ip;
char *remote_host;
char *remote_logname;
char *local_ip;
char *local_host;
long id;
void *sbh;
unsigned aborted;
int keepalives;
const char *log_id;
#if APR_HAS_THREADS
} conn_state_e;
} conn_sense_e;
struct conn_state_t {
struct server_addr_rec {
char *virthost;
struct ap_logconf {
signed char *module_levels;
int level;
struct server_rec {
char *error_fname;
void *errorlog_provider_handle;
const char *defn_name;
unsigned defn_line_number;
char is_virtual;
const char *server_scheme;
char *server_admin;
char *server_hostname;
int keep_alive_max;
int keep_alive;
const char *path;
int pathlen;
int limit_req_line;
int limit_req_fieldsize;
int limit_req_fields;
void *context;
struct ap_sload_t {
int idle;
int busy;
unsigned long access_count;
struct ap_loadavg_t {
float loadavg;
float loadavg5;
float loadavg15;
const char *document_root);
* Examine a field value (such as a media-/content-type) string and return
char stop);
* Unescape an application/x-www-form-urlencoded string
* Escape a string as application/x-www-form-urlencoded
* Escape a string as application/x-www-form-urlencoded, to a preallocated buffer
const char *prefix)
int cflags);
* a macro, to avoid unistd.h dependency
const char *delim);
const char *timeout_parameter,
const char *default_time_unit);
const char **dest);
const char *name;
* type application/x-www-form-urlencoded.
* Given the name of an object in the file system determine if it is a directory - this version is symlink aware
#ifdef _OSD_POSIX
#ifdef AP_DEBUG
#ifdef DEBUG_SIGSTOP
extern int raise_sigstop_flags;
#define RAISE_SIGSTOP(x) do { \
#define RAISE_SIGSTOP(x)
Note that on some platforms (e.g., AIX with gcc, Solaris with gcc), string.h needs
#include <string.h>
#ifdef AP_DEBUG
#ifdef apr_pcalloc
const char *username,
const char *passwd,
const char *hash);
const char *cmd,
const char * const *argv);
#ifdef __cplusplus