http_core.h revision 7184de27ec1d62a83c41cdeac0953ca9fd661e8c
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd/* Licensed to the Apache Software Foundation (ASF) under one or more
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * contributor license agreements. See the NOTICE file distributed with
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * this work for additional information regarding copyright ownership.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * The ASF licenses this file to You under the Apache License, Version 2.0
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * (the "License"); you may not use this file except in compliance with
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * the License. You may obtain a copy of the License at
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * Unless required by applicable law or agreed to in writing, software
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * distributed under the License is distributed on an "AS IS" BASIS,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * See the License for the specific language governing permissions and
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * limitations under the License.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @brief CORE HTTP Daemon
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @defgroup APACHE_CORE_HTTPD Core HTTP Daemon
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @ingroup APACHE_CORE
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/* ****************************************************************
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * The most basic server code is encapsulated in a single module
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * known as the core, which is just *barely* functional enough to
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * serve documents, though not terribly well.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * Largely for NCSA back-compatibility reasons, the core needs to
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * make pieces of its config structures available to other modules.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * The accessors are declared here, along with the interpretation
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * of one of them (allow_options).
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @defgroup APACHE_CORE_HTTPD_ACESSORS Acessors
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @brief File/Directory Accessor directives
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** No directives */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** Indexes directive */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** SSI is enabled without exec= permission */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** FollowSymLinks directive */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** ExecCGI directive */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** directive unset */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** SSI exec= permission is permitted, iff OPT_INCLUDES is also set */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** SymLinksIfOwnerMatch directive */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** MultiViews directive */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** All directives */
1983f1d91e4189acd330a0067cf9b3e516c13a31nd#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INC_WITH_EXEC|OPT_SYM_LINKS|OPT_EXECCGI)
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @defgroup get_remote_host Remote Host Resolution
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * @ingroup APACHE_CORE_HTTPD
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** REMOTE_HOST returns the hostname, or NULL if the hostname
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * lookup fails. It will force a DNS lookup according to the
1983f1d91e4189acd330a0067cf9b3e516c13a31nd * HostnameLookups setting.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** REMOTE_NAME returns the hostname, or the dotted quad if the
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * hostname lookup fails. It will force a DNS lookup according
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * to the HostnameLookups setting.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * never forced.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** REMOTE_DOUBLE_REV will always force a DNS lookup, and also force
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * a double reverse lookup, regardless of the HostnameLookups
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * setting. The result is the (double reverse checked) hostname,
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz * or NULL if any of the lookups fail.
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** @} // get_remote_host */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** all of the requirements must be met */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** any of the requirements must be met */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** There are no applicable satisfy lines */
b4a287513d176e4355dd56ea47b27228e0e5d75fjerenkrantz/** Make sure we don't write less than 8000 bytes at any one time.
AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip);
struct require_line {
char *requirement;
* the code that cares really is in http_core.c. Also, another accessor.
#ifndef AP_DEBUG
#define AP_CORE_MODULE_INDEX 0
#define ap_get_core_module_config(v) \
(((void **)(v))[AP_CORE_MODULE_INDEX])
void **notes;
const char *document_root;
const char *context_document_root;
const char *context_prefix;
int deliver_script;
int suppress_charset;
#define AP_NOTE_DIRECTORY_WALK 0
typedef unsigned char allow_options_t;
typedef unsigned char overrides_t;
typedef unsigned long etag_components_t;
#define ETAG_UNSET 0
/** path of the directory/regex/etc. see also d_is_fnmatch/absolute below */
unsigned d_components;
#define HOSTNAME_LOOKUP_OFF 0
#define USE_CANONICAL_NAME_OFF (0)
#define ADD_DEFAULT_CHARSET_OFF (0)
const char *add_default_charset_name;
#ifdef RLIMIT_CPU
#ifdef RLIMIT_NPROC
ap_regex_t *r;
* What attributes/data should be included in ETag generation?
#define ENABLE_MMAP_OFF (0)
#define ENABLE_SENDFILE_OFF (0)
#define USE_CANONICAL_PHYS_PORT_OFF (0)
#define AP_SENDFILE_ENABLED(x) \
char *gprof_dir;
const char *ap_document_root;
char *access_name;
const char *protocol;
* logged to the error log once per connection/request
#define AP_TRACE_DISABLE 0
int trace_enable;
/* for AddOutputFiltersByType in core.c */
/* for http_config.c */
AP_CORE_DECLARE(const char *) ap_add_if_conf(apr_pool_t *p, core_dir_config *conf, void *url_config);
AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg);
* Runtime status/management
const char *s_value;
long i_value;
const char *description;
const char *name;
* This hook provdes a way for modules to provide metrics/statistics about
typedef struct ap_errorlog_info {
const server_rec *s;
const conn_rec *c;
const request_rec *r;
const char *file;
int line;
int module_index;
int level;
int using_syslog;
int startup;
const char *format;
int flags);
typedef struct ap_errorlog_handler {
const char *arg;
unsigned int flags;
unsigned int min_loglevel;
(request_rec *r));
#define AP_SQ_MAIN_STATE 0
#ifdef __cplusplus