httpd.h revision 81cc440ca73845f44dc589db106d3feb7a36f33b
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* Licensed to the Apache Software Foundation (ASF) under one or more
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * contributor license agreements. See the NOTICE file distributed with
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * this work for additional information regarding copyright ownership.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * The ASF licenses this file to You under the Apache License, Version 2.0
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * (the "License"); you may not use this file except in compliance with
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * the License. You may obtain a copy of the License at
5a58787efeb02a1c3f06569d019ad81fd2efa06end * Unless required by applicable law or agreed to in writing, software
5a58787efeb02a1c3f06569d019ad81fd2efa06end * distributed under the License is distributed on an "AS IS" BASIS,
5a58787efeb02a1c3f06569d019ad81fd2efa06end * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5a58787efeb02a1c3f06569d019ad81fd2efa06end * See the License for the specific language governing permissions and
5a58787efeb02a1c3f06569d019ad81fd2efa06end * limitations under the License.
5a58787efeb02a1c3f06569d019ad81fd2efa06end * @brief HTTP Daemon routines
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd * @defgroup APACHE Apache
c7811a175dc15d2172cc95f1c9791bbb6caf9b04nd * Top level group of which all other groups are a member
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd * @defgroup APACHE_MODS Apache Modules
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Top level group for Apache Modules
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @defgroup APACHE_OS Operating System Specific
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @defgroup APACHE_CORE Apache Core
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen * @defgroup APACHE_CORE_DAEMON HTTP Daemon Routine
5a58787efeb02a1c3f06569d019ad81fd2efa06end/* XXX - We need to push more stuff to other .h files, or even .c files, to
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * make this file smaller
5a58787efeb02a1c3f06569d019ad81fd2efa06end/* Headers in which EVERYONE has an interest... */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* Note: apr_uri.h is also included, see below */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kessextern "C" {
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* ----------------------------- config dir ------------------------------ */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Define this to be the default server home dir. Most things later in this
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * file with a relative pathname will have this added.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Set default for OS/2 file system */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Set default for Windows file system */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Set the default for NetWare */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Set for all other OSs */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#endif /* HTTPD_ROOT */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * --------- You shouldn't have to edit anything below this line ----------
dcf73e82ff6eda04fc24e50753631fd83bf61f3drbowen * Any modifications to any defaults not defined above should be done in the
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * respective configuration file.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Default location of documents. Can be overridden by the DocumentRoot
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * directive.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* Set default for OS/2 file system */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* Set default for non OS/2 file system */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#endif /* DOCUMENT_LOCATION */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Maximum number of dynamically loaded modules */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Default administrator's address */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The name of the log files */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#endif /* DEFAULT_ERRORLOG */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Define this to be what your per-directory security files are called */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* Set default for OS/2 file system */
fd98d2e18dca5790daa7e49b4384937e6ba7666cerikabele#endif /* DEFAULT_ACCESS_FNAME */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The name of the server config file */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The default path for CGI scripts if none is currently set */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin"
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The path to the suExec wrapper, can be overridden in Configuration */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The timeout for waiting for messages */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The timeout for waiting for keepalive timeout until next request */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The number of requests to entertain per connection */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Limits on the size of various request items. These limits primarily
261c62b53a9c707c64c7824eed68b5463bd23e62nd * exist to prevent simple denial-of-service attacks on a server based
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * on misuse of the protocol. The recommended values will depend on the
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * nature of the server resources -- CGI scripts and database backends
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * might require large values, but most servers could get by with much
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * smaller limits than we use below. The request message body size can
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * be limited by the per-dir config directive LimitRequestBody.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Internal buffer sizes are two bytes more than the DEFAULT_LIMIT_REQUEST_LINE
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * and DEFAULT_LIMIT_REQUEST_FIELDSIZE below, which explains the 8190.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * These two limits can be lowered or raised by the server config
261c62b53a9c707c64c7824eed68b5463bd23e62nd * directives LimitRequestLine and LimitRequestFieldsize, respectively.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * DEFAULT_LIMIT_REQUEST_FIELDS can be modified or disabled (set = 0) by
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * the server config directive LimitRequestFields.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** default limit on bytes in Request-Line (Method+URI+HTTP-version) */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** default limit on bytes in any one header field */
5a58787efeb02a1c3f06569d019ad81fd2efa06end/** default limit on number of request header fields */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * The default default character set name to add if AddDefaultCharset is
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * enabled. Overridden with AddDefaultCharsetName.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** default HTTP Server protocol */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* ------------------ stuff that modules are allowed to look at ----------- */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Define this to be what your HTML directory content files are called */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The name of the MIME types file */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Define the HTML doctype strings centrally.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** HTML 2.0 Doctype */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DOCTYPE_HTML_2_0 "<!DOCTYPE HTML PUBLIC \"-//IETF//" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "DTD HTML 2.0//EN\">\n"
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** HTML 3.2 Doctype */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DOCTYPE_HTML_3_2 "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "DTD HTML 3.2 Final//EN\">\n"
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** HTML 4.0 Strict Doctype */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DOCTYPE_HTML_4_0S "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "DTD HTML 4.0//EN\"\n" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** HTML 4.0 Transitional Doctype */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DOCTYPE_HTML_4_0T "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "DTD HTML 4.0 Transitional//EN\"\n" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** HTML 4.0 Frameset Doctype */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DOCTYPE_HTML_4_0F "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
5a58787efeb02a1c3f06569d019ad81fd2efa06end "DTD HTML 4.0 Frameset//EN\"\n" \
5a58787efeb02a1c3f06569d019ad81fd2efa06end/** XHTML 1.0 Strict Doctype */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DOCTYPE_XHTML_1_0S "<!DOCTYPE html PUBLIC \"-//W3C//" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "DTD XHTML 1.0 Strict//EN\"\n" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "xhtml1-strict.dtd\">\n"
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** XHTML 1.0 Transitional Doctype */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DOCTYPE_XHTML_1_0T "<!DOCTYPE html PUBLIC \"-//W3C//" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "DTD XHTML 1.0 Transitional//EN\"\n" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "xhtml1-transitional.dtd\">\n"
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** XHTML 1.0 Frameset Doctype */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define DOCTYPE_XHTML_1_0F "<!DOCTYPE html PUBLIC \"-//W3C//" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "DTD XHTML 1.0 Frameset//EN\"\n" \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess "xhtml1-frameset.dtd\">"
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Internal representation for a HTTP protocol number, e.g., HTTP/1.1 */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Major part of HTTP protocol */
261c62b53a9c707c64c7824eed68b5463bd23e62nd/** Minor part of HTTP protocol */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* -------------- Port number for server running standalone --------------- */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** default HTTP Port */
261c62b53a9c707c64c7824eed68b5463bd23e62nd/** default HTTPS Port */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Check whether @a port is the default port for the request @a r.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @param port The port number
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @param r The request
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @see #ap_default_port
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define ap_is_default_port(port,r) ((port) == ap_default_port(r))
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Get the default port for a request (which depends on the scheme).
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @param r The request
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Get the scheme for a request.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @param r The request
5a58787efeb02a1c3f06569d019ad81fd2efa06end/** The default string length */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The length of a Huge string */
261c62b53a9c707c64c7824eed68b5463bd23e62nd/** The size of the server's internal read-write buffers */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The max number of regex captures that can be expanded by ap_pregsub */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * APR_HAS_LARGE_FILES introduces the problem of spliting sendfile into
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * mutiple buckets, no greater than MAX(apr_size_t), and more granular
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * than that in case the brigade code/filters attempt to read it directly.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * ### 16mb is an invention, no idea if it is reasonable.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Special Apache error codes. These are basically used
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * in http_main.c so we can keep track of various errors.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** a normal exit */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** A fatal error arising during the server's init sequence */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** The child died during its init sequence */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * The child exited due to a resource shortage.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * The parent should limit the rate of forking until
5a58787efeb02a1c3f06569d019ad81fd2efa06end * the situation is resolved.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * A fatal error, resulting in the whole server aborting.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * If a child exits with this error, the parent process
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * considers this a server-wide fatal error and aborts.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Stuff marked #AP_DECLARE is part of the API, and intended for use
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * by modules. Its purpose is to allow us to add attributes that
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * particular platforms or compilers require to every exported function.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Stuff marked #AP_DECLARE_NONSTD is part of the API, and intended for
261c62b53a9c707c64c7824eed68b5463bd23e62nd * use by modules. The difference between #AP_DECLARE and
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * #AP_DECLARE_NONSTD is that the latter is required for any functions
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * which use varargs or are used via indirect function call. This
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * is to accomodate the two calling conventions in windows dlls.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @internal
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * modules should not use functions marked AP_CORE_DECLARE
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @internal
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * modules should not use functions marked AP_CORE_DECLARE_NONSTD
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @brief The numeric version information is broken out into fields within this
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * structure.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kesstypedef struct {
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess const char *add_string; /**< additional string like "-dev" */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Return httpd's version information in a numeric form.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @param version Pointer to a version structure for returning the version
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * information.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kessAP_DECLARE(void) ap_get_server_revision(ap_version_t *version);
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Get the server banner in a form suitable for sending over the
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * network, with the level of information controlled by the
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * ServerTokens directive.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @return The server banner
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Get the server description in a form suitable for local displays,
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * status reports, or logging. This includes the detailed server
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * version and information about some modules. It is not affected
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * by the ServerTokens directive.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @return The server description
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kessAP_DECLARE(const char *) ap_get_server_description(void);
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Add a component to the server description and banner strings
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @param pconf The pool to allocate the component from
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @param component The string to add
5a58787efeb02a1c3f06569d019ad81fd2efa06endAP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component);
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen * Get the date a time that the server was built
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen * @return The server build time string
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen/* non-HTTP status codes returned by hooks */
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen#define DONE -2 /**< Module has served the response completely
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen * - it's safe to die() with no more output
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen#define SUSPENDED -3 /**< Module will handle the remainder of the request.
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen * The core will never invoke the request again, */
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen/** Returned by the bottom-most filter if no data was written.
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen * @see ap_pass_brigade(). */
f8dee27891059abb09ff5ca3fc5434f5719d22a0rbowen/** Returned by the bottom-most filter if no data was read.
5a58787efeb02a1c3f06569d019ad81fd2efa06end * @see ap_get_brigade(). */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Returned by any filter if the filter chain encounters an error
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * and has already dealt with the error response.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @defgroup HTTP_Status HTTP Status Codes
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * The size of the static array in http_protocol.c for storing
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * all of the potential response status-lines (a sparse table).
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * A future version should dynamically generate the apr_table_t at startup.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** is the status code informational */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** is the status code OK ?*/
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define ap_is_HTTP_SUCCESS(x) (((x) >= 200)&&((x) < 300))
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** is the status code a redirect */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define ap_is_HTTP_REDIRECT(x) (((x) >= 300)&&((x) < 400))
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** is the status code a error (client or server) */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** is the status code a client error */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define ap_is_HTTP_CLIENT_ERROR(x) (((x) >= 400)&&((x) < 500))
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** is the status code a server error */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define ap_is_HTTP_SERVER_ERROR(x) (((x) >= 500)&&((x) < 600))
d5b8072762cf428c4c703ed7054ae948d41c910bnd/** is the status code a (potentially) valid response code? */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define ap_is_HTTP_VALID_RESPONSE(x) (((x) >= 100)&&((x) < 600))
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** should the status code drop the connection */
5a58787efeb02a1c3f06569d019ad81fd2efa06end (((x) == HTTP_BAD_REQUEST) || \
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @defgroup Methods List of Methods recognized by the server
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @ingroup APACHE_CORE_DAEMON
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @brief Methods recognized (but not necessarily handled) by the server.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * These constants are used in bit shifting masks of size int, so it is
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * unsafe to have more methods than bits in an int. HEAD == M_GET.
261c62b53a9c707c64c7824eed68b5463bd23e62nd * This list must be tracked by the list in http_protocol.c in routine
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * ap_method_name_of().
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define M_VERSION_CONTROL 15 /** RFC 3253: WebDAV Versioning */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * METHODS needs to be equal to the number of bits
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * we are using for limit masks.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * The method mask bit to shift for anding with a bitmask.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** @see ap_method_list_t */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @struct ap_method_list_t
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @brief Structure for handling HTTP methods.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * Methods known to the server are accessed via a bitmask shortcut;
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * extension methods are handled by an array.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess /** The bitmask used for known methods */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess /** the array used for extension methods */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * @defgroup module_magic Module Magic mime types
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Magic for mod_cgi[d] */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Magic for mod_include */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Magic for mod_include */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#define INCLUDES_MAGIC_TYPE3 "text/x-server-parsed-html3"
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Magic for mod_dir */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/* Just in case your linefeed isn't the one the other end is expecting. */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** linefeed */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** carrige return */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** carrige return /Line Feed Combo */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#else /* APR_CHARSET_EBCDIC */
a795ca2487c774aa6fe75c765a2bf17f969f7af7nd/* For platforms using the EBCDIC charset, the transition ASCII->EBCDIC is done
a795ca2487c774aa6fe75c765a2bf17f969f7af7nd * in the buff package (bread/bputs/bwrite). Everywhere else, we use
a795ca2487c774aa6fe75c765a2bf17f969f7af7nd * "native EBCDIC" CR and NL characters. These are therefore
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess * defined as
a795ca2487c774aa6fe75c765a2bf17f969f7af7nd * '\r' and '\n'.
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess#endif /* APR_CHARSET_EBCDIC */
fefb8b844b6286bfc41bb2e0c4cc003b8e7d4ff2kess/** Useful for common code with either platform charset. */
d05d0eb4ae6d2a5e513fc3bf2555ce33da416634nd * @defgroup values_request_rec_body Possible values for request_rec.read_body
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd * Possible values for request_rec.read_body (set by handling module):
5a58787efeb02a1c3f06569d019ad81fd2efa06end/** Send 413 error if message has any body */
#define AP_REQ_ACCEPT_PATH_INFO 0
struct htaccess_result {
const char *dir;
int override;
int override_opts;
/* ### would be nice to not include this from httpd.h ... */
#include "apr_uri.h"
struct process_rec {
const char *short_name;
const char * const *argv;
int argc;
struct request_rec {
* (see http_request.h) */
* protocol.c should ever touch...
char *the_request;
int assbackwards;
/** A proxy request (calculated during post_read_request/translate_name)
int proxyreq;
int header_only;
int proto_num;
char *protocol;
const char *hostname;
const char *status_line;
int status;
/* Request method, two ways; also, protocol, etc.. Outside of protocol.c,
int method_number;
const char *method;
const char *range;
int chunked;
int read_body;
int read_chunked;
unsigned expecting_100;
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;
struct conn_rec {
/** used by http_vhost.c */
void *vhost_lookup_data;
char *remote_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;
struct conn_state_t {
conn_rec *c;
apr_pool_t *p;
struct server_addr_rec {
char *virthost;
struct ap_logconf {
signed char *module_levels;
int level;
struct server_rec {
char *error_fname;
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;
typedef struct core_output_filter_ctx {
typedef struct core_filter_ctx {
} core_ctx_t;
typedef struct core_net_rec {
conn_rec *c;
} core_net_rec;
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)
#ifdef strtoul
Note that on some platforms (e.g., AIX with gcc, Solaris with gcc), string.h needs
#include <string.h>
#ifdef AP_DEBUG
#ifdef __cplusplus