httpd.h revision 0ff36975b1f5fef1ccc0429bb76bcdaccd5d122b
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* ====================================================================
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * The Apache Software License, Version 1.1
a1d62218cdb0efd0f02da1b54fd3eda91a681d98nd * Copyright (c) 2000 The Apache Software Foundation. All rights
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * reserved.
031b91a62d25106ae69d4693475c79618dd5e884fielding * Redistribution and use in source and binary forms, with or without
031b91a62d25106ae69d4693475c79618dd5e884fielding * modification, are permitted provided that the following conditions
031b91a62d25106ae69d4693475c79618dd5e884fielding * 1. Redistributions of source code must retain the above copyright
031b91a62d25106ae69d4693475c79618dd5e884fielding * notice, this list of conditions and the following disclaimer.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * 2. Redistributions in binary form must reproduce the above copyright
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * notice, this list of conditions and the following disclaimer in
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * the documentation and/or other materials provided with the
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * distribution.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * 3. The end-user documentation included with the redistribution,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * if any, must include the following acknowledgment:
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * "This product includes software developed by the
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd * Apache Software Foundation (http://www.apache.org/)."
7db9f691a00ead175b03335457ca296a33ddf31bnd * Alternately, this acknowledgment may appear in the software itself,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * if and wherever such third-party acknowledgments normally appear.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * 4. The names "Apache" and "Apache Software Foundation" must
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * not be used to endorse or promote products derived from this
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * software without prior written permission. For written
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * permission, please contact apache@apache.org.
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * 5. Products derived from this software may not be called "Apache",
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * nor may "Apache" appear in their name, without prior written
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * permission of the Apache Software Foundation.
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1452b080f4412d03ba6fef6342b147b63d559489igalic * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * SUCH DAMAGE.
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * ====================================================================
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * This software consists of voluntary contributions made by many
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * individuals on behalf of the Apache Software Foundation. For more
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * information on the Apache Software Foundation, please see
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * Portions of this software are based upon public domain software
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * originally written at the National Center for Supercomputing Applications,
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * University of Illinois, Urbana-Champaign.
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52ndextern "C" {
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * httpd.h: header for simple (ha! not anymore) http daemon
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd/* XXX - We need to push more stuff to other .h files, or even .c files, to
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * make this file smaller
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd * @package HTTP Daemon routines
7cab1c2452476a360ebd1ec41d0f2d5e4d216f52nd/* Headers in which EVERYONE has an interest... */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* ----------------------------- config dir ------------------------------ */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Define this to be the default server home dir. Most things later in this
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * file with a relative pathname will have this added.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Set default for OS/2 file system */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Set default for Windows file system */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Set the default for BeOS */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* HTTPD_ROOT */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * --------- You shouldn't have to edit anything below this line ----------
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Any modifications to any defaults not defined above should be done in the
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * respective configuration file.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Default location of documents. Can be overridden by the DocumentRoot
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * directive.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Set default for OS/2 file system */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* DOCUMENT_LOCATION */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Maximum number of dynamically loaded modules */
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen/* Default administrator's address */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The target name of the installed Apache */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* --------- Default user name and group name ----------------------------- */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* --- These may be specified as numbers by placing a # before a number --- */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The name of the log files */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* DEFAULT_XFERLOG */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* DEFAULT_ERRORLOG */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Define this to be what your per-directory security files are called */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Set default for OS/2 file system */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* DEFAULT_ACCESS_FNAME */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The name of the server config file */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Whether we should enable rfc1413 identity checking */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The default path for CGI scripts if none is currently set */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin"
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The path to the suExec wrapper, can be overridden in Configuration */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The timeout for waiting for messages */
ee839bff15fb30721b7e919f0d0db8e810d05856kess/* The timeout for waiting for keepalive timeout until next request */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The number of requests to entertain per connection */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The maximum length of the queue of pending connections, as defined
ee839bff15fb30721b7e919f0d0db8e810d05856kess * by listen(2). Under some systems, it should be increased if you
ee839bff15fb30721b7e919f0d0db8e810d05856kess * are experiencing a heavy TCP SYN flood attack.
ee839bff15fb30721b7e919f0d0db8e810d05856kess * It defaults to 511 instead of 512 because some systems store it
ee839bff15fb30721b7e919f0d0db8e810d05856kess * as an 8-bit datatype; 512 truncated to 8-bits is 0, while 511 is
ee839bff15fb30721b7e919f0d0db8e810d05856kess * 255 when truncated.
ee839bff15fb30721b7e919f0d0db8e810d05856kess/* Limits on the size of various request items. These limits primarily
ee839bff15fb30721b7e919f0d0db8e810d05856kess * exist to prevent simple denial-of-service attacks on a server based
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * on misuse of the protocol. The recommended values will depend on the
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * nature of the server resources -- CGI scripts and database backends
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * might require large values, but most servers could get by with much
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * smaller limits than we use below. The request message body size can
ee839bff15fb30721b7e919f0d0db8e810d05856kess * be limited by the per-dir config directive LimitRequestBody.
ee839bff15fb30721b7e919f0d0db8e810d05856kess * Internal buffer sizes are two bytes more than the DEFAULT_LIMIT_REQUEST_LINE
ee839bff15fb30721b7e919f0d0db8e810d05856kess * and DEFAULT_LIMIT_REQUEST_FIELDSIZE below, which explains the 8190.
ee839bff15fb30721b7e919f0d0db8e810d05856kess * These two limits can be lowered (but not raised) by the server config
ee839bff15fb30721b7e919f0d0db8e810d05856kess * directives LimitRequestLine and LimitRequestFieldsize, respectively.
ee839bff15fb30721b7e919f0d0db8e810d05856kess * DEFAULT_LIMIT_REQUEST_FIELDS can be modified or disabled (set = 0) by
ee839bff15fb30721b7e919f0d0db8e810d05856kess * the server config directive LimitRequestFields.
ee839bff15fb30721b7e919f0d0db8e810d05856kess#endif /* default limit on bytes in Request-Line (Method+URI+HTTP-version) */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* default limit on bytes in any one header field */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* default limit on number of request header fields */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * The default default character set name to add if AddDefaultCharset is
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * enabled. Overridden with AddDefaultCharsetName.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * The below defines the base string of the Server: header. Additional
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * tokens can be added via the ap_add_version_component() API call.
da0adf12448333eb0051038ca5864c10be41b5abnd * The tokens are listed in order of their significance for identifying the
da0adf12448333eb0051038ca5864c10be41b5abnd * application.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * "Product tokens should be short and to the point -- use of them for
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * advertizing or other non-essential information is explicitly forbidden."
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Example: "Apache/1.1.0 MrWidget/0.1-alpha"
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Define this to 1 if you want fancy indexing, 0 otherwise */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* CORE_PRIVATE */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define AP_SERVER_BASEVENDOR "Apache Software Foundation"
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define AP_SERVER_BASEVERSION AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* ------------------ stuff that modules are allowed to look at ----------- */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Define this to be what your HTML directory content files are called */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Define this to be what type you'd like returned for files with unknown */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* suffixes. MUST be all lower case. */
da0adf12448333eb0051038ca5864c10be41b5abnd/* The name of the MIME types file */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Define the HTML doctype strings centrally.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define DOCTYPE_HTML_2_0 "<!DOCTYPE HTML PUBLIC \"-//IETF//" \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess "DTD HTML 2.0//EN\">\n"
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define DOCTYPE_HTML_3_2 "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess "DTD HTML 3.2 Final//EN\">\n"
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define DOCTYPE_HTML_4_0S "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess "DTD HTML 4.0//EN\"\n" \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define DOCTYPE_HTML_4_0T "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess "DTD HTML 4.0 Transitional//EN\"\n" \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define DOCTYPE_HTML_4_0F "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess "DTD HTML 4.0 Frameset//EN\"\n" \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* -- Internal representation for a HTTP protocol number, e.g., HTTP/1.1 -- */
5ecf823a6706f7ebf7498a32eabdc80228366335nd/* -------------- Port number for server running standalone --------------- */
5ecf823a6706f7ebf7498a32eabdc80228366335nd#define ap_is_default_port(port,r) ((port) == ap_default_port(r))
5ecf823a6706f7ebf7498a32eabdc80228366335nd/* The default string lengths */
5ecf823a6706f7ebf7498a32eabdc80228366335nd/* The size of the server's internal read-write buffers */
808d414265beec573145d1867ca70c69e6c84bb8nd * Special Apache error codes. These are basically used
5ecf823a6706f7ebf7498a32eabdc80228366335nd * in http_main.c so we can keep track of various errors.
5ecf823a6706f7ebf7498a32eabdc80228366335nd * APEXIT_OK:
5ecf823a6706f7ebf7498a32eabdc80228366335nd * A normal exit
5ecf823a6706f7ebf7498a32eabdc80228366335nd * APEXIT_INIT:
5ecf823a6706f7ebf7498a32eabdc80228366335nd * A fatal error arising during the server's init sequence
5ecf823a6706f7ebf7498a32eabdc80228366335nd * APEXIT_CHILDINIT:
5ecf823a6706f7ebf7498a32eabdc80228366335nd * The child died during it's init sequence
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * APEXIT_CHILDFATAL:
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * A fatal error, resulting in the whole server aborting.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * If a child exits with this error, the parent process
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * considers this a server-wide fatal error and aborts.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Get the server version string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The server version string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc const char *ap_get_server_version(void)
e8835a75f92c2c05a0d6149f83bd6be0e27673cdmartin * Add a component to the version string
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param pconf The pool to allocate the component out of
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param component The string to add
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @deffunc void ap_add_version_component(apr_pool_t *pconf, const char *component)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Get the date a time that the server was built
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The server build time string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Numeric release version identifier: MMNNFFRBB: major minor fix final beta
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Always increases along the same track as the source branch.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * For example, Apache 1.4.2 would be '10402100', 2.5b7 would be '20500007'.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define DONE -2 /* Module has served the response completely
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * - it's safe to die() with no more output
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* ----------------------- HTTP Status Codes ------------------------- */
78b793d8a29e21cc903ca8061e4126e314719328humbedooh/* The size of the static array in http_protocol.c for storing
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * all of the potential response status-lines (a sparse table).
78b793d8a29e21cc903ca8061e4126e314719328humbedooh * A future version should dynamically generate the apr_table_t at startup.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define ap_is_HTTP_SUCCESS(x) (((x) >= 200)&&((x) < 300))
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define ap_is_HTTP_REDIRECT(x) (((x) >= 300)&&((x) < 400))
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define ap_is_HTTP_CLIENT_ERROR(x) (((x) >= 400)&&((x) < 500))
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define ap_is_HTTP_SERVER_ERROR(x) (((x) >= 500)&&((x) < 600))
0f93029cdef373b2c887bf4cff19891a4a24b135kess/* Methods recognized (but not necessarily handled) by the server.
0f93029cdef373b2c887bf4cff19891a4a24b135kess * These constants are used in bit shifting masks of size int, so it is
0f93029cdef373b2c887bf4cff19891a4a24b135kess * unsafe to have more methods than bits in an int. HEAD == M_GET.
0f93029cdef373b2c887bf4cff19891a4a24b135kess * This list must be tracked by the list in http_protocol.c in routine
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * ap_method_name_of().
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Structure for handling HTTP methods. Methods known to the server are
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * accessed via a bitmask shortcut; extension methods are handled by
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * an array.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* The bitmask used for known methods */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* The array used for extension methods */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define INCLUDES_MAGIC_TYPE3 "text/x-server-parsed-html3"
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define ASCIITEXT_MAGIC_TYPE_PREFIX "text/x-ascii-" /* Text files whose content-type starts with this are passed thru unconverted */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /*CHARSET_EBCDIC*/
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Just in case your linefeed isn't the one the other end is expecting. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#else /* CHARSET_EBCDIC */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* For platforms using the EBCDIC charset, the transition ASCII->EBCDIC is done
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * in the buff package (bread/bputs/bwrite). Everywhere else, we use
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * "native EBCDIC" CR and NL characters. These are therefore
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * defined as
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * '\r' and '\n'.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* CHARSET_EBCDIC */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Possible values for request_rec.read_body (set by handling module):
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REQUEST_NO_BODY Send 413 error if message has any body
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REQUEST_CHUNKED_ERROR Send 411 error if body without Content-Length
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REQUEST_CHUNKED_DECHUNK If chunked, remove the chunks for me.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REQUEST_CHUNKED_PASS Pass the chunks to me without removal.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Things which may vary per file-lookup WITHIN a request ---
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * e.g., state of MIME config. Basically, the name of an object, info
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * about the object, and any other info we may ahve which may need to
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * change as we go poking around looking for it (e.g., overridden by
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * .htaccess files).
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Note how the default state of almost all these things is properly
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * zero, so that allocating it with pcalloc does the right thing without
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * a whole lot of hairy initialization... so long as we are willing to
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * make the (fairly) portable assumption that the bit pattern of a NULL
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * pointer is, in fact, zero.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * This represents the result of calling htaccess; these are cached for
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * each request.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** the directory to which this applies */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *dir;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** the overrides allowed for the .htaccess file */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** the configuration directives */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** the next one, or NULL if no more; N.B. never change this */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The following four types define a hierarchy of activities, so that
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * given a request_rec r you can write r->connection->server->process
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * to get to the process_rec. While this reduces substantially the
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * number of arguments that various hooks require beware that in
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * threaded versions of the server you must consider multiplexing
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * issues. */
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl/** structure to aid charset translate between machine and network */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* contents are experimental! expect it to change! */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** translation handle to use when coming from the network */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /*APACHE_XLATE*/
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/** A structure that represents one process */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Global pool. Please try to cleared on _all_ exits */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** aka configuration pool, cleared on restarts */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** How many command line arguments were pass to the program */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The command line arguments */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess char *const *argv;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The program name used to execute the program */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *short_name;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/** A structure that represents the current request */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The pool associated with the request */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The connection over which this connection has been read */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The virtual host this request is for */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** If we wind up getting redirected, pointer to the request we
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * redirected to. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** If this is an internal redirect, pointer to where we redirected
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * *from*. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** If this is a sub_request (see request.h) pointer back to the
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * main request. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* Info about the request itself... we begin with stuff that only
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * protocol.c should ever touch...
da0adf12448333eb0051038ca5864c10be41b5abnd /** First line of request, so we can log it */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** HTTP/0.9, "simple" request */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** A proxy request (calculated during post_read_request/translate_name) */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** HEAD request, as opposed to GET */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Protocol, as given to us, or HTTP/0.9 */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Number version of protocol; 1.1 = 1001 */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Host, as set by full URI or Host: */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *hostname;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** When the request started */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Status line, if set by script */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *status_line;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** In any case */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* Request method, two ways; also, protocol, etc.. Outside of protocol.c,
f59a2b72270d63d121d6a1a01d85fb87d8a8bb45rbowen * look, but don't touch.
2c924fae91b45e3f04b91e6eed4d6df92313c4c6igalic /** GET, HEAD, POST, etc. */
f59a2b72270d63d121d6a1a01d85fb87d8a8bb45rbowen const char *method;
2c924fae91b45e3f04b91e6eed4d6df92313c4c6igalic /** M_GET, M_POST, etc. */
2c924fae91b45e3f04b91e6eed4d6df92313c4c6igalic * allowed is a bitvector of the allowed methods.
2c924fae91b45e3f04b91e6eed4d6df92313c4c6igalic * A handler must ensure that the request method is one that
2c924fae91b45e3f04b91e6eed4d6df92313c4c6igalic * it is capable of handling. Generally modules should DECLINE
2c924fae91b45e3f04b91e6eed4d6df92313c4c6igalic * any request methods they do not handle. Prior to aborting the
f59a2b72270d63d121d6a1a01d85fb87d8a8bb45rbowen * handler like this the handler should set r->allowed to the list
f59a2b72270d63d121d6a1a01d85fb87d8a8bb45rbowen * of methods that it is willing to handle. This bitvector is used
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * to construct the "Allow:" header required for OPTIONS requests,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * and HTTP_METHOD_NOT_ALLOWED and HTTP_NOT_IMPLEMENTED status codes.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Since the default_handler deals with OPTIONS, all modules can
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * usually decline to deal with OPTIONS. TRACE is always allowed,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * modules don't need to set it explicitly.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Since the default_handler will always handle a GET, a
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * module which does *not* implement GET should probably return
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * HTTP_METHOD_NOT_ALLOWED. Unfortunately this means that a Script GET
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * handler can't be installed by mod_actions. </PRE>
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Allowed methods - for 405, OPTIONS, etc */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Array of extension methods */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** List of allowed methods */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** byte count in stream is for body */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** body byte count, for easy access */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Time the resource was last modified */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* HTTP/1.1 connection-level features */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** sending chunked transfer-coding */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** number of byte ranges */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** multipart/byteranges boundary */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The Range: header */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *range;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The "real" content length */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** bytes left to read */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** bytes that have been read */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** how the request body should be read */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** reading chunked transfer-coding */
da0adf12448333eb0051038ca5864c10be41b5abnd /** is client waiting for a 100 response? */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* MIME header environments, in and out. Also, an array containing
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * environment variables to be passed to subprocesses, so people can
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * write modules to add to that environment.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * The difference between headers_out and err_headers_out is that the
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * latter are printed even on error, and persist across internal redirects
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * (so the headers printed for ErrorDocument handlers will have them).
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * The 'notes' apr_table_t is for notes from one module to another, with no
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * other set purpose in mind...
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** MIME header environment from the request */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** MIME header environment for the response */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** MIME header environment for the response, printed even on errors and
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * persist across internal redirects */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Array of environment variables to be used for sub processes */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Notes from one module to another */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* content_type, handler, content_encoding, content_language, and all
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * content_languages MUST be lowercased strings. They may be pointers
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * to static strings; they should not be modified in place.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The content-type for the current request */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *content_type; /* Break these out --- we dispatch on 'em */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The handler string that we use to call a handler function */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *handler; /* What we *really* dispatch on */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** How to encode the data */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** for back-compat. only -- do not use */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** array of (char*) representing the content languages */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** variant list validator (if negotiated) */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** If an authentication check was made, this gets set to the user name. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** If an authentication check was made, this gets set to the auth type. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** This response is non-cache-able */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** There is no local copy of this response */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* What object is being requested (either directly, or via include
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * or content-negotiation mapping).
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** the uri without any parsing performed */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** the path portion of the URI */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The filename on disk that this response corresponds to */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The path_info for this request if there is any. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** QUERY_ARGS, if any */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** ST_MODE set to zero if no such file */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** components of uri, dismantled */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* Various other config info which may change with .htaccess files
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * These are config vectors, with one void* pointer for each module
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * (the thing pointed to being the module's business).
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Options set in config files, etc. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Notes on *this* request */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * a linked list of the configuration directives in the .htaccess files
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * accessed by this request.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * N.B. always add to the head of the list, _never_ to the end.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * that way, a sub request's list can (temporarily) point to a parent's list
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @defvar const htaccess_result *htaccess
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** A list of output filters to be used for this request
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @defvar ap_filter_t *output_filters */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** A list of input filters to be used for this request
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @defvar ap_filter_t *filters */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** A flag to determine if the eos bucket has been sent yet
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @defvar int eos_sent */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Things placed at the end of the record to avoid breaking binary
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * compatibility. It would be nice to remember to reorder the entire
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * record to improve 64bit alignment the next time we need to break
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * binary compatibility for some other reason.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/** Structure to store things which are per connection */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Pool associated with this connection */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Physical vhost this conn come in on */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** used by http_vhost.c */
da0adf12448333eb0051038ca5864c10be41b5abnd /* Information about the connection itself */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Connection to the client */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* Who is the client? */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** local address */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** remote address */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Client's IP address */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Client's DNS name, if known. NULL if DNS hasn't been checked,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * "" if it has and no address was found. N.B. Only access this though
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * get_remote_host() */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Only ever set if doing rfc1413 lookups. N.B. Only access this through
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * get_remote_logname() */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Are we still talking? */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Are we using HTTP Keep-Alive? -1 fatal error, 0 undecided, 1 yes */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Did we use HTTP Keep-Alive? */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** How many times have we used it? */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** server IP address */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** used for ap_get_server_name when UseCanonicalName is set to DNS
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * (ignores setting of HostnameLookups) */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** ID of this connection; unique at any point in time */
d4b86bdf358d2f6fbd2954d364dee07e9e7f81d8kess /** Notes on *this* connection */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** send note from one module to another, must remain valid for all
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * requests on this conn */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** A list of input filters to be used for this request
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @defvar ap_filter_t *filters */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** A list of output filters to be used for this connection
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @defvar ap_filter_t *filters */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The length of the current request body
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @defvar long remain */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Per-vhost config... */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* The address 255.255.255.255, when used as a virtualhost address,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * will become the "default" server when the ip doesn't match other vhosts.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/** A structure to be used for Per-vhost config */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The next server in the list */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The bound address, for this server */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The bound port, for this server */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess unsigned short host_port;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The name given in <VirtualHost> */
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd/** A structure to store information for each virtual server */
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd /** The process this server is running in */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The next server in the list */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The name of the server */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *defn_name;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The line of the config file that the server was defined on */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* Contact information */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The admin's contact information */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The server hostname */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** for redirects, etc. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess unsigned short port;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* Log files --- note that transfer log is now in the modules... */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The name of the error log */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** A file descriptor that references the error log */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** The log level for this server */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* Module-specific configuration for server, and defaults... */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** true if this is the virtual server */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Config vector containing pointers to modules' per-server config
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * structures. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** MIME type info, etc., before we start checking per-directory info */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* Transaction handling */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** I haven't got a clue */
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd /** Timeout, in seconds, before we give up */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Seconds we'll wait for another request */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Maximum requests per connection */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Use persistent connections? */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Pathname for ServerPath */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess const char *path;
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Length of path */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Normal names for ServerAlias servers */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** Wildcarded names for ServerAlias servers */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** effective user id when calling exec wrapper */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /** effective group id when calling exec wrapper */
03e9ead3ab8fd4116e73d6b57133de1d333bd6fbnd /** limit on size of the HTTP request line */
03e9ead3ab8fd4116e73d6b57133de1d333bd6fbnd /** limit on size of any request header field */
f878b571b1811af95303032eafe04e285d77beednd /** limit on number of request header fields */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* stuff marked AP_DECLARE is part of the API, and intended for use
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * by modules
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Stuff marked AP_DECLARE_NONSTD is part of the API, and intended for
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * use by modules. The difference between AP_DECLARE and
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * AP_DECLARE_NONSTD is that the latter is required for any functions
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * which use varargs or are used via indirect function call. This
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * is to accomodate the two calling conventions in windows dlls.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* modules should not used functions marked AP_CORE_DECLARE
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * or AP_CORE_DECLARE_NONSTD */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* On Mac OS X Server, symbols that conflict with loaded dylibs
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * (eg. System framework) need to be declared as private symbols with
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * __private_extern__.
0f09d65886fe9c60fd3a3d09f2e0dcd9a1c2a6b9nd * For other systems, make that a no-op.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#if (defined(MAC_OS) || defined(MAC_OS_X_SERVER)) && defined(__DYNAMIC__)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Examine a field value (such as a media-/content-type) string and return
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * it sans any parameters; e.g., strip off any ';charset=foo' and the like.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p Pool to allocate memory out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param intype The field to examine
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return the field minus any parameters
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_field_noparam(apr_pool_t *p, const char *intype);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_field_noparam(apr_pool_t *p, const char *intype);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Convert a time from an integer into a string in a specified format
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate memory out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param t The time to convert
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param fmt The format to use for the conversion
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * @param gmt Convert the time for GMT?
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * @return The string that represents the specified time
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * @deffunc char *ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int gmt)
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105ndAP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int gmt);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* String handling. The *_nc variants allow you to use non-const char **s as
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess arguments (unfortunately C won't automatically convert a char ** to a const
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess char **) */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Get the characters until the first occurance of a specified character
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate memory out of
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param line The string to get the characters from
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param stop The character to stop at
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @return A copy of the characters up to the first stop character
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @deffunc char *ap_getword(apr_pool_t *p, const char **line, char stop);
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekessAP_DECLARE(char *) ap_getword(apr_pool_t *p, const char **line, char stop);
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * Get the characters until the first occurance of a specified character
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param p The pool to allocate memory out of
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param line The string to get the characters from
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param stop The character to stop at
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @return A copy of the characters up to the first stop character
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @tip This is the same as ap_getword, except it doesn't use const char **.
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @deffunc char *ap_getword_nc(apr_pool_t *p, char **line, char stop);
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekessAP_DECLARE(char *) ap_getword_nc(apr_pool_t *p, char **line, char stop);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Get the first word from a given string. A word is defined as all characters
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * up to the first whitespace.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate memory from
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param line The string to traverse
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @retrn The first word in the line
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_getword_white(apr_pool_t *p, const char **line)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_getword_white(apr_pool_t *p, const char **line);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Get the first word from a given string. A word is defined as all characters
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * up to the first whitespace.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate memory from
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param line The string to traverse
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @retrn The first word in the line
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @tip The same as ap_getword_white, except it doesn't use const char **.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_getword_white_nc(apr_pool_t *p, const char **line)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *p, char **line);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Get all characters from the first occurance of stop to the first '\0'
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate memory out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param line The line to traverse
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param stop The character to start at
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A copy of all caracters after the first occurance of the specified
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * character
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * @deffunc char *ap_getword_nulls(apr_pool_t *p, const char **line, char stop)
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105ndAP_DECLARE(char *) ap_getword_nulls(apr_pool_t *p, const char **line, char stop);
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * Get all characters from the first occurance of stop to the first '\0'
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * @param p The pool to allocate memory out of
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * @param line The line to traverse
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * @param stop The character to start at
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * @return A copy of all caracters after the first occurance of the specified
2323f8d3ae57ddaf5a9659c4ba2757baba7ee105nd * character
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @tip The same as ap_getword_nulls, except it doesn't use const char **.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Get the second word in the string paying attention to quoting
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param line The line to traverse
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A copy of the string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_getword_conf(apr_pool_t *p, const char **line)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line);
d4b86bdf358d2f6fbd2954d364dee07e9e7f81d8kess * Get the second word in the string paying attention to quoting
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param line The line to traverse
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A copy of the string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @tip The same as ap_getword_conf, except it doesn't use const char **.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_getword_conf_nc(apr_pool_t *p, char **line)
d4b86bdf358d2f6fbd2954d364dee07e9e7f81d8kessAP_DECLARE(char *) ap_getword_conf_nc(apr_pool_t *p, char **line);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Check a string for any ${ENV} environment variable construct and replace
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * each them by the value of that environment variable, if it exists. If the
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * environment value does not exist, leave the ${ENV} construct alone; it
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * means something else.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param word The string to check
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The string with the replaced environment variables
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc const char *ap_resolve_env(apr_pool_t *p, const char *word)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Size an HTTP header field list item, as separated by a comma.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param field The field to size
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param len The length of the field
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The return value is a pointer to the beginning of the non-empty
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * list item within the original string (or NULL if there is none) and the
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * address of field is shifted to the next non-comma, non-whitespace
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * character. len is the length of the item excluding any beginning whitespace.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc const char *ap_size_list_item(const char **field, int *len)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(const char *) ap_size_list_item(const char **field, int *len);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Retrieve an HTTP header field list item, as separated by a comma,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * while stripping insignificant whitespace and lowercasing anything not in
4c73d7a42f095e64fed195a19c5cb6f78e0bf252nd * a quoted string or comment.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param field The field to retrieve
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The return value is a new string containing the converted list
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * item (or NULL if none) and the address pointed to by field is
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * shifted to the next non-comma, non-whitespace.
4c73d7a42f095e64fed195a19c5cb6f78e0bf252nd * @deffunc char *ap_get_list_item(apr_pool_t *p, const char **field)
4c73d7a42f095e64fed195a19c5cb6f78e0bf252ndAP_DECLARE(char *) ap_get_list_item(apr_pool_t *p, const char **field);
4c73d7a42f095e64fed195a19c5cb6f78e0bf252nd * Find an item in canonical form (lowercase, no extra spaces) within
4c73d7a42f095e64fed195a19c5cb6f78e0bf252nd * an HTTP field value list.
4c73d7a42f095e64fed195a19c5cb6f78e0bf252nd * @param p The pool to allocate out of
4c73d7a42f095e64fed195a19c5cb6f78e0bf252nd * @param line The field value list to search
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param tok The token to search for
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if found, 0 if not found.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_find_list_item(apr_pool_t *p, const char *line, const char *tok)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *tok);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Retrieve a token, spacing over it and returning a pointer to
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * the first non-white byte afterwards. Note that these tokens
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * are delimited by semis and commas; and can also be delimited
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * by whitespace at the caller's option.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param accept_line The line to retrieve the token from
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param accept_white Is it delimited by whitespace
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return the first non-white byte after the token
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * find http tokens, see the definition of token from RFC2068
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param line The line to find the token
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param tok The token to find
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if the token is found, 0 otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_find_token(apr_pool_t *p, const char *line, const char *tok)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(int) ap_find_token(apr_pool_t *p, const char *line, const char *tok);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * find http tokens from the end of the line
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param line The line to find the token
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param tok The token to find
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if the token is found, 0 otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_find_last_token(apr_pool_t *p, const char *line, const char *tok)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(int) ap_find_last_token(apr_pool_t *p, const char *line, const char *tok);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Check for an Absolute URI syntax
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param u The string to check
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if URI, 0 otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_is_url(const char *u)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Unescape a URL
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param url The url to unescapte
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 0 on success, non-zero otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_unescape_url(char *url)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Remove all double slashes from a string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param name The string to parse
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc void ap_no2slash(char *name)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Remove all ./ and ../ substrings from a file name
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param name the file name to parse
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc void ap_getparents(char *name)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Escape a path segment, as defined in RFC 1808
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s The path to convert
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The converted URL
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_escape_path_segment(apr_pool_t *p, const char *s)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *s);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * convert an OS path to a URL in an OS dependant way.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param path The path to convert
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param partial if set, assume that the path will be appended to something
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * with a '/' in it (and thus does not prefix "./")
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The converted URL
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_os_escape_path(apr_pool_t *p, const char *path, int partial)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partial);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Escape an html string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s The html to escape
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The escaped string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_escape_html(apr_pool_t *p, const char *s)
da0adf12448333eb0051038ca5864c10be41b5abndAP_DECLARE(char *) ap_escape_html(apr_pool_t *p, const char *s);
da0adf12448333eb0051038ca5864c10be41b5abnd * Construct a full hostname
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param hostname The hostname of the server
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param port The port the server is running on
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param r The current request
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The server's hostname
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_construct_server(apr_pool_t *p, const char *hostname, unsiged port, const request_rec *r)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Escape a shell command
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s The command to escape
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The escaped hostname
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_escape_shell_cmd(apr_pool_t *p, const char *s)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *s);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Count the number of directories in a path
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param The path to count
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The number of directories
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_count_dirs(const char *path)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Copy at most n leading directories of s into d d should be at least as
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * large as s plus 1 extra byte
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param d The location to copy to
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s The location to copy from
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param n The number of directories to copy
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return value is the ever useful pointer to the trailing \0 of d
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_make_dirstr_prefix(char *d, const char *s, int n)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @tip on platforms with drive letters, n = 0 returns the "/" root,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * whereas n = 1 returns the "d:/" root. On all other platforms, n = 0
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * returns the empty string.
da0adf12448333eb0051038ca5864c10be41b5abndAP_DECLARE(char *) ap_make_dirstr_prefix(char *d, const char *s, int n);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * return the parent directory name including trailing / of the file s
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s The file to get the parent of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A copy of the file's parent directory
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_make_dirstr_parent(apr_pool_t *p, const char *s)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Given a directory and filename, create a single path out of them. This
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * function is smart enough to ensure that there is a sinlge '/' between the
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * directory and file names
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param a The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param dir The directory name
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param f The filename
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A copy of the full path
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_make_full_path(apr_pool_t *a, const char *dir, const char *f)
4c73d7a42f095e64fed195a19c5cb6f78e0bf252ndAP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *dir, const char *f);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Does the provided string contain wildcard characters? This is useful
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * for determining if the string should be passed to strcmp_match or to strcmp.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * The only wildcard characters recognized are '?' and '*'
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param str The string to check
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if the string has wildcards, 0 otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_is_matchexp(const char *str)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Determine if a string matches a patterm containing the wildcards '?' or '*'
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param str The string to check
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param exp The pattern to match against
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if the two strings match, 0 otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_strcmp_match(const char *str, const char *exp)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(int) ap_strcmp_match(const char *str, const char *exp);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Determine if a string matches a patterm containing the wildcards '?' or '*',
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * ignoring case
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param str The string to check
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param exp The pattern to match against
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if the two strings match, 0 otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_strcasecmp_match(const char *str, const char *exp)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *exp);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Find the first occurrence of the substring s2 in s1, regardless of case
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s1 The string to search
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s2 The substring to search for
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A pointer to the beginning of the substring
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_strcasestr(const char *s1, const char *s2)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_strcasestr(const char *s1, const char *s2);
4c73d7a42f095e64fed195a19c5cb6f78e0bf252nd * Return a pointer to the location inside of bigstring immediately after prefix
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param bigstring The input string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param prefix The prefix to strip away
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A pointer relative to bigstring after prefix
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * deffunc char *ap_stripprefix(const char *bigstring, const char *prefix);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_stripprefix(const char *bigstring, const char *prefix);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Decode a base64 encoded string into memory allocated out of a pool
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param bufcoded The encoded string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The decoded string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_pbase64decode(apr_pool_t *p, const char *bufcoded)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Encode a string into memory allocated out of a pool in base 64 format
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param strin The plaintext string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The encoded string
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_pbase64encode(apr_pool_t *p, char *string)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Compile a regular expression to be used later
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param pattern the regular expression to compile
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param cflags The bitwise or of one or more of the following:
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REG_EXTENDED - Use POSIX extended Regular Expressions
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REG_ICASE - Ignore case
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REG_NOSUB - Support for substring addressing of matches not required
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REG_NEWLINE - Match-any-character operators don't match new-line
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The compiled regular expression
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc regex_t *ap_pregcomp(apr_pool_t *p, const char *pattern, int cflags)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern,
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd * Free the memory associated with a compiled regular expression
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd * @param p The pool the regex was allocated out of
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd * @param reg The regular expression to free
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd * @deffunc void ap_pregfree(apr_pool_t *p, regex_t *reg)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(void) ap_pregfree(apr_pool_t *p, regex_t *reg);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Match a null-terminated string against a pre-compiled regex.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param preg The pre-compiled regex
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param string The string to match
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param nmatch Provide information regarding the location of any matches
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param pmatch Provide information regarding the location of any matches
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param eflags Bitwise or of one or both of:
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REG_NOTBOL - match-beginning-of-line operator always fails to match
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * REG_NOTEOL - match-end-of-line operator always fails to match
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 0 for successful match, REG_NOMATCH otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(int) ap_regexec(regex_t *preg, const char *string,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Return the error code returned by regcomp or regexec into error messages
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param errocode the error code returned by regexec or regcomp
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param preg The precompiled regex
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param errbuf A buffer to store the error in
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param errbuf_size The size of the buffer
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc size_t ap_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(size_t) ap_regerror(int errcode, const regex_t *preg,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * After performing a successful regex match, you may use this function to
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * perform a series of string substitutions based on subexpressions that were
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * matched during the call to ap_regexec
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param input An arbitrary string containing $1 through $9. These are
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * replaced with the corresponding matched sub-expressions
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param source The string that was originally matched to the regex
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd * @param nmatch the nmatch returned from ap_pregex
d282b5abebd9c783b5db6b95b7d0a2707dd3317cnd * @param pmatch the pmatch array returned from ap_pregex
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_pregsub(apr_pool_t *p, const char *input, const char *source, size_t nmatch, regmatch_t pmatch[])
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input, const char *source,
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * we want to downcase the type/subtype for comparison purposes
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * but nothing else because ;parameter=foo values are case sensitive.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s The content-type to convert to lowercase
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc void ap_content_type_tolower(char *s)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * convert a string to all lowercase
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param s The string to convert to lowercase
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc void ap_str_tolower(char *s)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Search a string from left to right for the first occurrence of a
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * specific character
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param str The string to search
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param c The character to search for
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @return The index of the first occurrence of c in str
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @deffunc int ap_ind(const char *str, char c)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(int) ap_ind(const char *str, char c); /* Sigh... */
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * Search a string from right to left for the first occurrence of a
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * specific character
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param str The string to search
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param c The character to search for
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The index of the first occurrence of c in str
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_rind(const char *str, char c)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Given a string, replace any bare " with \" .
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate memory out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param instring The string to search for "
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A copy of the string with escaped quotes
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char * ap_escape_quotes(apr_pool_t *p, const char *instring)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(char *) ap_escape_quotes(apr_pool_t *p, const char *instring);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* Misc system hackery */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Convert a username to a numeric ID
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param name The name to convert
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The user id corresponding to a name
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc uid_t ap_uname2id(const char *name)
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * Convert a group name to a numeric ID
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param name The name to convert
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The group id corresponding to a name
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @deffunc gid_t ap_gname2id(const char *name)
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * Given the name of an object in the file system determine if it is a directory
5374ede903209d8b6cfd2b56bb4ea1f390d0d43ekess * @param name The name of the object to check
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if it is a directory, 0 otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_is_rdirectory(const char *name)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Given the name of an object in the file system determine if it is a directory - this version is symlink aware
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param name The name of the object to check
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return 1 if it is a directory, 0 otherwise
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_is_directory(const char *name)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Given a pathname in file, extract the directory and chdir to that directory
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param file The file who's directory we wish to switch to
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc void ap_chdir_file(const char *file)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Get the maximum number of daemons processes for this version of Apache
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The maximum number of daemon processes
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc int ap_get_max_daemons(void)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessextern const char *os_set_account(apr_pool_t *p, const char *account);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessextern int os_init_job_environment(server_rec *s, const char *user_name, int one_process);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* _OSD_POSIX */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * determine the local host name for the current machine
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param p The pool to allocate out of
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return A copy of the local host name
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc char *ap_get_local_host(apr_pool_t *p)
d4b86bdf358d2f6fbd2954d364dee07e9e7f81d8kess * Parses a host of the form <address>[:port] :port is permitted if 'port'
d4b86bdf358d2f6fbd2954d364dee07e9e7f81d8kess * is not NULL
d4b86bdf358d2f6fbd2954d364dee07e9e7f81d8kess * @param hostname The hostname to parse
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param port The port found in the hostname
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @return The address of the server
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc unsigned long ap_get_virthost_addr(char *hostname, unsigned shor *port)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessunsigned long ap_get_virthost_addr(char *hostname, unsigned short *port);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Redefine assert() to something more useful for an Apache...
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Use ap_assert() if the condition should always be checked.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Use AP_DEBUG_ASSERT() if the condition should only be checked when AP_DEBUG
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * is defined.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * Log an assertion to the error log
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param szExp The assertion that failed
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param szFile The file the assertion is in
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @param nLine The line the assertion is defined on
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * @deffunc void ap_log_assert(const char *szExp, const char *szFile, int nLine)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define ap_assert(exp) ((exp) ? (void)0 : ap_log_assert(#exp,__FILE__,__LINE__))
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* A set of flags which indicate places where the server should raise(SIGSTOP).
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * This is useful for debugging, because you can then attach to that process
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * with gdb and continue. This is important in cases where one_process
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess * debugging isn't possible.
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define RAISE_SIGSTOP(x) do { \
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess if (raise_sigstop_flags & SIGSTOP_##x) raise(SIGSTOP);\
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess } while (0)
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessAP_DECLARE(extern const char *) ap_psignature(const char *prefix, request_rec *r);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess/* strtoul does not exist on sunos4. */
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#define strtoul strtoul_is_not_a_portable_function_use_strtol_instead
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess /* The C library has functions that allow const to be silently dropped ...
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess these macros detect the drop in maintainer mode, but use the native
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess methods far narmal builds
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kesschar *ap_strchr(char *s, int c);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessconst char *ap_strchr_c(const char *s, int c);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kesschar *ap_strrchr(char *s, int c);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessconst char *ap_strrchr_c(const char *s, int c);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kesschar *ap_strstr(char *s, char *c);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kessconst char *ap_strstr_c(const char *s, const char *c);
d1c57621ac04d94ccf54d0aab6f5af0de44bece9kess#endif /* !APACHE_HTTPD_H */