Apache HTTPD
Modules | Classes | Macros | Typedefs | Functions
HTTP Daemon Routine

Modules

 HTTPD specific values of apr_status_t
 
 HTTP Status Codes
 
 List of Methods recognized by the server
 Methods recognized (but not necessarily handled) by the server.
 
 Binary notes recognized by the server
 Binary notes recognized by the server.
 
 Possible values for request_rec.used_path_info
 

Classes

struct  ap_version_t
 The numeric version information is broken out into fields within this structure. More...
 
struct  ap_method_list_t
 Structure for handling HTTP methods. More...
 

Macros

#define HTTPD_ROOT   "/usr/local/apache"
 
#define DOCUMENT_LOCATION   HTTPD_ROOT "/htdocs"
 
#define DYNAMIC_MODULE_LIMIT   256
 
#define DEFAULT_ADMIN   "[no address given]"
 
#define DEFAULT_ERRORLOG   "logs/error_log"
 
#define DEFAULT_ACCESS_FNAME   ".htaccess"
 
#define SERVER_CONFIG_FILE   "conf/httpd.conf"
 
#define DEFAULT_PATH   "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin"
 
#define SUEXEC_BIN   HTTPD_ROOT "/bin/suexec"
 
#define DEFAULT_TIMEOUT   60
 
#define DEFAULT_KEEPALIVE_TIMEOUT   5
 
#define DEFAULT_KEEPALIVE   100
 
#define DEFAULT_LIMIT_REQUEST_LINE   8190
 
#define DEFAULT_LIMIT_REQUEST_FIELDSIZE   8190
 
#define DEFAULT_LIMIT_REQUEST_FIELDS   100
 
#define DEFAULT_LIMIT_BLANK_LINES   10
 
#define DEFAULT_ADD_DEFAULT_CHARSET_NAME   "iso-8859-1"
 
#define AP_SERVER_PROTOCOL   "HTTP/1.1"
 
#define AP_DEFAULT_INDEX   "index.html"
 
#define AP_TYPES_CONFIG_FILE   "conf/mime.types"
 
#define DOCTYPE_HTML_2_0
 
#define DOCTYPE_HTML_3_2
 
#define DOCTYPE_HTML_4_0S
 
#define DOCTYPE_HTML_4_0T
 
#define DOCTYPE_HTML_4_0F
 
#define DOCTYPE_XHTML_1_0S
 
#define DOCTYPE_XHTML_1_0T
 
#define DOCTYPE_XHTML_1_0F
 
#define HTTP_VERSION(major, minor)   (1000*(major)+(minor))
 
#define HTTP_VERSION_MAJOR(number)   ((number)/1000)
 
#define HTTP_VERSION_MINOR(number)   ((number)%1000)
 
#define DEFAULT_HTTP_PORT   80
 
#define DEFAULT_HTTPS_PORT   443
 
#define ap_is_default_port(port, r)   ((port) == ap_default_port(r))
 
#define ap_default_port(r)   ap_run_default_port(r)
 
#define ap_http_scheme(r)   ap_run_http_scheme(r)
 
#define MAX_STRING_LEN   HUGE_STRING_LEN
 
#define HUGE_STRING_LEN   8192
 
#define AP_IOBUFSIZE   8192
 
#define AP_MAX_REG_MATCH   10
 
#define AP_MAX_SENDFILE   16777216 /* 2^24 */
 
#define APEXIT_OK   0x0
 
#define APEXIT_INIT   0x2
 
#define APEXIT_CHILDINIT   0x3
 
#define APEXIT_CHILDSICK   0x7
 
#define APEXIT_CHILDFATAL   0xf
 
#define AP_CORE_DECLARE   AP_DECLARE
 
#define AP_CORE_DECLARE_NONSTD   AP_DECLARE_NONSTD
 
#define OK   0
 
#define DECLINED   -1
 
#define DONE   -2
 
#define SUSPENDED   -3
 
#define AP_NOBODY_WROTE   -100
 
#define AP_NOBODY_READ   -101
 
#define AP_FILTER_ERROR   -102
 

Typedefs

typedef struct ap_method_list_t ap_method_list_t
 

Functions

void ap_get_server_revision (ap_version_t *version)
 
const charap_get_server_banner (void)
 
const charap_get_server_description (void)
 
void ap_add_version_component (apr_pool_t *pconf, const char *component)
 
const charap_get_server_built (void)
 

Detailed Description

Macro Definition Documentation

◆ AP_CORE_DECLARE

#define AP_CORE_DECLARE (   void)    AP_DECLARE

Definition at line 381 of file httpd.h.

◆ AP_CORE_DECLARE_NONSTD

#define AP_CORE_DECLARE_NONSTD   AP_DECLARE_NONSTD

Definition at line 390 of file httpd.h.

◆ AP_DEFAULT_INDEX

#define AP_DEFAULT_INDEX   "index.html"

Define this to be what your HTML directory content files are called

Definition at line 223 of file httpd.h.

◆ ap_default_port

#define ap_default_port (   r)    ap_run_default_port(r)

Get the default port for a request (which depends on the scheme).

Parameters
rThe request

Definition at line 292 of file httpd.h.

◆ AP_FILTER_ERROR

#define AP_FILTER_ERROR   -102

Returned by any filter if the filter chain encounters an error and has already dealt with the error response.

Definition at line 473 of file httpd.h.

◆ ap_http_scheme

#define ap_http_scheme (   r)    ap_run_http_scheme(r)

Get the scheme for a request.

Parameters
rThe request

Definition at line 297 of file httpd.h.

◆ AP_IOBUFSIZE

#define AP_IOBUFSIZE   8192

The size of the server's internal read-write buffers

Definition at line 306 of file httpd.h.

◆ ap_is_default_port

#define ap_is_default_port (   port,
  r 
)    ((port) == ap_default_port(r))

Check whether port is the default port for the request r.

Parameters
portThe port number
rThe request
See also
ap_default_port

Definition at line 287 of file httpd.h.

◆ AP_MAX_REG_MATCH

#define AP_MAX_REG_MATCH   10

The max number of regex captures that can be expanded by ap_pregsub

Definition at line 309 of file httpd.h.

◆ AP_MAX_SENDFILE

#define AP_MAX_SENDFILE   16777216 /* 2^24 */

APR_HAS_LARGE_FILES introduces the problem of splitting sendfile into multiple buckets, no greater than MAX(apr_size_t), and more granular than that in case the brigade code/filters attempt to read it directly.

16mb is an invention, no idea if it is reasonable.

Definition at line 317 of file httpd.h.

◆ AP_NOBODY_READ

#define AP_NOBODY_READ   -101

Returned by the bottom-most filter if no data was read.

See also
ap_get_brigade().

Definition at line 469 of file httpd.h.

◆ AP_NOBODY_WROTE

#define AP_NOBODY_WROTE   -100

Returned by the bottom-most filter if no data was written.

See also
ap_pass_brigade().

Definition at line 466 of file httpd.h.

◆ AP_SERVER_PROTOCOL

#define AP_SERVER_PROTOCOL   "HTTP/1.1"

default HTTP Server protocol

Definition at line 216 of file httpd.h.

◆ AP_TYPES_CONFIG_FILE

#define AP_TYPES_CONFIG_FILE   "conf/mime.types"

The name of the MIME types file

Definition at line 228 of file httpd.h.

◆ APEXIT_CHILDFATAL

#define APEXIT_CHILDFATAL   0xf

A fatal error, resulting in the whole server aborting. If a child exits with this error, the parent process considers this a server-wide fatal error and aborts.

Definition at line 341 of file httpd.h.

◆ APEXIT_CHILDINIT

#define APEXIT_CHILDINIT   0x3

The child died during its init sequence

Definition at line 329 of file httpd.h.

◆ APEXIT_CHILDSICK

#define APEXIT_CHILDSICK   0x7

The child exited due to a resource shortage. The parent should limit the rate of forking until the situation is resolved.

Definition at line 335 of file httpd.h.

◆ APEXIT_INIT

#define APEXIT_INIT   0x2

A fatal error arising during the server's init sequence

Definition at line 327 of file httpd.h.

◆ APEXIT_OK

#define APEXIT_OK   0x0

MPM child process exit status values The MPM parent process may check the status to see if special error handling is required. a normal exit

Definition at line 325 of file httpd.h.

◆ DECLINED

#define DECLINED   -1

Module declines to handle

Definition at line 457 of file httpd.h.

◆ DEFAULT_ACCESS_FNAME

#define DEFAULT_ACCESS_FNAME   ".htaccess"

Define this to be what your per-directory security files are called

Definition at line 140 of file httpd.h.

◆ DEFAULT_ADD_DEFAULT_CHARSET_NAME

#define DEFAULT_ADD_DEFAULT_CHARSET_NAME   "iso-8859-1"

The default default character set name to add if AddDefaultCharset is enabled. Overridden with AddDefaultCharsetName.

Definition at line 213 of file httpd.h.

◆ DEFAULT_ADMIN

#define DEFAULT_ADMIN   "[no address given]"

Default administrator's address

Definition at line 123 of file httpd.h.

◆ DEFAULT_ERRORLOG

#define DEFAULT_ERRORLOG   "logs/error_log"

The name of the log files

Definition at line 130 of file httpd.h.

◆ DEFAULT_HTTP_PORT

#define DEFAULT_HTTP_PORT   80

default HTTP Port

Definition at line 278 of file httpd.h.

◆ DEFAULT_HTTPS_PORT

#define DEFAULT_HTTPS_PORT   443

default HTTPS Port

Definition at line 280 of file httpd.h.

◆ DEFAULT_KEEPALIVE

#define DEFAULT_KEEPALIVE   100

The number of requests to entertain per connection

Definition at line 171 of file httpd.h.

◆ DEFAULT_KEEPALIVE_TIMEOUT

#define DEFAULT_KEEPALIVE_TIMEOUT   5

The timeout for waiting for keepalive timeout until next request

Definition at line 166 of file httpd.h.

◆ DEFAULT_LIMIT_BLANK_LINES

#define DEFAULT_LIMIT_BLANK_LINES   10

default/hard limit on number of leading/trailing empty lines

Definition at line 206 of file httpd.h.

◆ DEFAULT_LIMIT_REQUEST_FIELDS

#define DEFAULT_LIMIT_REQUEST_FIELDS   100

default limit on number of request header fields

Definition at line 202 of file httpd.h.

◆ DEFAULT_LIMIT_REQUEST_FIELDSIZE

#define DEFAULT_LIMIT_REQUEST_FIELDSIZE   8190

default limit on bytes in any one header field

Definition at line 198 of file httpd.h.

◆ DEFAULT_LIMIT_REQUEST_LINE

#define DEFAULT_LIMIT_REQUEST_LINE   8190

default limit on bytes in Request-Line (Method+URI+HTTP-version)

Definition at line 194 of file httpd.h.

◆ DEFAULT_PATH

#define DEFAULT_PATH   "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin"

The default path for CGI scripts if none is currently set

Definition at line 151 of file httpd.h.

◆ DEFAULT_TIMEOUT

#define DEFAULT_TIMEOUT   60

The timeout for waiting for messages

Definition at line 161 of file httpd.h.

◆ DOCTYPE_HTML_2_0

#define DOCTYPE_HTML_2_0
Value:
"<!DOCTYPE HTML PUBLIC \"-//IETF//" \
"DTD HTML 2.0//EN\">\n"

HTML 2.0 Doctype

Definition at line 235 of file httpd.h.

◆ DOCTYPE_HTML_3_2

#define DOCTYPE_HTML_3_2
Value:
"<!DOCTYPE HTML PUBLIC \"-//W3C//" \
"DTD HTML 3.2 Final//EN\">\n"

HTML 3.2 Doctype

Definition at line 238 of file httpd.h.

◆ DOCTYPE_HTML_4_0F

#define DOCTYPE_HTML_4_0F
Value:
"<!DOCTYPE HTML PUBLIC \"-//W3C//" \
"DTD HTML 4.0 Frameset//EN\"\n" \
"\"http://www.w3.org/TR/REC-html40/frameset.dtd\">\n"

HTML 4.0 Frameset Doctype

Definition at line 249 of file httpd.h.

◆ DOCTYPE_HTML_4_0S

#define DOCTYPE_HTML_4_0S
Value:
"<!DOCTYPE HTML PUBLIC \"-//W3C//" \
"DTD HTML 4.0//EN\"\n" \
"\"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"

HTML 4.0 Strict Doctype

Definition at line 241 of file httpd.h.

◆ DOCTYPE_HTML_4_0T

#define DOCTYPE_HTML_4_0T
Value:
"<!DOCTYPE HTML PUBLIC \"-//W3C//" \
"DTD HTML 4.0 Transitional//EN\"\n" \
"\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n"

HTML 4.0 Transitional Doctype

Definition at line 245 of file httpd.h.

◆ DOCTYPE_XHTML_1_0F

#define DOCTYPE_XHTML_1_0F
Value:
"<!DOCTYPE html PUBLIC \"-//W3C//" \
"DTD XHTML 1.0 Frameset//EN\"\n" \
"\"http://www.w3.org/TR/xhtml1/DTD/" \
"xhtml1-frameset.dtd\">"

XHTML 1.0 Frameset Doctype

Definition at line 263 of file httpd.h.

◆ DOCTYPE_XHTML_1_0S

#define DOCTYPE_XHTML_1_0S
Value:
"<!DOCTYPE html PUBLIC \"-//W3C//" \
"DTD XHTML 1.0 Strict//EN\"\n" \
"\"http://www.w3.org/TR/xhtml1/DTD/" \
"xhtml1-strict.dtd\">\n"

XHTML 1.0 Strict Doctype

Definition at line 253 of file httpd.h.

◆ DOCTYPE_XHTML_1_0T

#define DOCTYPE_XHTML_1_0T
Value:
"<!DOCTYPE html PUBLIC \"-//W3C//" \
"DTD XHTML 1.0 Transitional//EN\"\n" \
"\"http://www.w3.org/TR/xhtml1/DTD/" \
"xhtml1-transitional.dtd\">\n"

XHTML 1.0 Transitional Doctype

Definition at line 258 of file httpd.h.

◆ DOCUMENT_LOCATION

#define DOCUMENT_LOCATION   HTTPD_ROOT "/htdocs"

Default location of documents. Can be overridden by the DocumentRoot directive.

Definition at line 113 of file httpd.h.

◆ DONE

#define DONE   -2

Module has served the response completely

  • it's safe to die() with no more output

Definition at line 460 of file httpd.h.

◆ DYNAMIC_MODULE_LIMIT

#define DYNAMIC_MODULE_LIMIT   256

Maximum number of dynamically loaded modules

Definition at line 119 of file httpd.h.

◆ HTTP_VERSION

#define HTTP_VERSION (   major,
  minor 
)    (1000*(major)+(minor))

Internal representation for a HTTP protocol number, e.g., HTTP/1.1

Definition at line 269 of file httpd.h.

◆ HTTP_VERSION_MAJOR

#define HTTP_VERSION_MAJOR (   number)    ((number)/1000)

Major part of HTTP protocol

Definition at line 271 of file httpd.h.

◆ HTTP_VERSION_MINOR

#define HTTP_VERSION_MINOR (   number)    ((number)%1000)

Minor part of HTTP protocol

Definition at line 273 of file httpd.h.

◆ HTTPD_ROOT

#define HTTPD_ROOT   "/usr/local/apache"

Define this to be the default server home dir. Most things later in this file with a relative pathname will have this added. Set for all other OSs

Definition at line 91 of file httpd.h.

◆ HUGE_STRING_LEN

#define HUGE_STRING_LEN   8192

The length of a Huge string

Definition at line 303 of file httpd.h.

◆ MAX_STRING_LEN

#define MAX_STRING_LEN   HUGE_STRING_LEN

The default string length

Definition at line 300 of file httpd.h.

◆ OK

#define OK   0

Module has handled this stage.

Definition at line 456 of file httpd.h.

◆ SERVER_CONFIG_FILE

#define SERVER_CONFIG_FILE   "conf/httpd.conf"

The name of the server config file

Definition at line 146 of file httpd.h.

◆ SUEXEC_BIN

#define SUEXEC_BIN   HTTPD_ROOT "/bin/suexec"

The path to the suExec wrapper, can be overridden in Configuration

Definition at line 156 of file httpd.h.

◆ SUSPENDED

#define SUSPENDED   -3

Module will handle the remainder of the request. The core will never invoke the request again,

Definition at line 462 of file httpd.h.

Typedef Documentation

◆ ap_method_list_t

See also
ap_method_list_t

Definition at line 634 of file httpd.h.

Function Documentation

◆ ap_add_version_component()

void ap_add_version_component ( apr_pool_t pconf,
const char component 
)

Add a component to the server description and banner strings

Parameters
pconfThe pool to allocate the component from
componentThe string to add

Definition at line 3598 of file core.c.

◆ ap_get_server_banner()

const char * ap_get_server_banner ( void  )

Get the server banner in a form suitable for sending over the network, with the level of information controlled by the ServerTokens directive.

Returns
The server banner

Definition at line 3593 of file core.c.

◆ ap_get_server_built()

const char * ap_get_server_built ( void  )

Get the date a time that the server was built

Returns
The server build time string

Definition at line 26 of file buildmark.c.

◆ ap_get_server_description()

const char * ap_get_server_description ( void  )

Get the server description in a form suitable for local displays, status reports, or logging. This includes the detailed server version and information about some modules. It is not affected by the ServerTokens directive.

Returns
The server description

Definition at line 3587 of file core.c.

◆ ap_get_server_revision()

void ap_get_server_revision ( ap_version_t version)

Return httpd's version information in a numeric form.

Parameters
versionPointer to a version structure for returning the version information.

Definition at line 3579 of file core.c.