Retrieve the optional functions for each module. This is run immediately before the server starts. Optional functions should be registered during the hook registration phase.
create_connection is a RUN_FIRST hook which allows modules to create connections. In general, you should not install filters with the create_connection hook. If you require vhost configuration information to make filter installation decisions, you must use the pre_connection or install_network_transport hook. This hook should close the connection if it encounters a fatal error condition.
This hook gives protocol modules an opportunity to set everything up before calling the protocol handler. All pre-connection hooks are run until one returns something other than ok or decline Apache の付属文書によれば,accept()直後に呼ばれる
int x_pre_connection(conn_rec *c,
void *csd)
return
OK or DECLINED
c
The connection on which the request has been received.
csd
The mechanism on which this connection is to be read. Most times this will be a socket, but it is up to the module that accepts the request to determine the exact type.
This hook implements different protocols. After a connection has been established, the protocol module must read and serve the request. This function does that for each protocol module. The first protocol module to handle the request is the last module run.
int x_process_connection(conn_rec *c)
return
OK or DECLINED
c
The connection on which the request has been received.
This hook allows modules to affect the request immediately after the request has been read, and before any other phases have been processes. This allows modules to make decisions based upon the input header fields
Run the quick handler functions for each module. The quick_handler is run before any other requests hooks are called (location_walk, directory_walk, access checking, et. al.). This hook was added to provide a quick way to serve content from a URI keyed cache. Apache の付属文書によれば,キャッシュモジュールが使用している.
int x_quick_handler(request_rec *r,
int lookup_uri)
r
The request_rec
lookup_uri
Controls whether the caller actually wants content or not. lookup is set when the quick_handler is called out of ap_sub_req_lookup_uri()
This hook allow modules an opportunity to translate the URI into an actual filename. If no modules do anything special, the server's default rules will be followed.
This hook allow modules to set the per_dir_config based on their own context (such as sections) and responds to contextless requests such as TRACE that need no security or filesystem mapping. based on the filesystem.
int x_map_to_storage(request_rec *r)
return
DONE (or HTTP_) if this contextless request was just fulfilled (such as TRACE), OK if this is not a file, and DECLINED if this is a file. The core map_to_storage (HOOK_RUN_REALLY_LAST) will directory_walk and file_walk the r->filename.
This hook is used to apply additional access control to this resource. It runs *before* a user is authenticated, so this hook is really to apply additional restrictions independent of a user. It also runs independent of 'Require' directive usage.
This hook is used to analyze the request headers, authenticate the user, and set the user information in the request record (r->user and r->ap_auth_type). This hook is only run when Apache determines that authentication/authorization is required for this resource (as determined by the 'Require' directive). It runs after the access_checker hook, and before the auth_checker hook.
This hook is used to check to see if the resource being requested is available for the authenticated user (r->user and r->ap_auth_type). It runs after the access_checker and check_user_id hooks. Note that it will *only* be called if Apache determines that access control has been applied to this resource (through a 'Require' directive).
This routine is called to determine and/or set the various document type information bits, like Content-type (via r->content_type), language, et cetera.
This hook allows modules to retrieve the http method from a request. This allows Apache modules to easily extend the methods that Apache understands ここで言う"method" は scheme の間違いのようです.実際,Apache 2.2 では ap_hook_http_scheme() に変更されています.
This hook provdes a way for modules to provide metrics/statistics about their operational status.
int x_get_mgmt_items(apr_pool_t *p,
const char * val,
apr_hash_t *ht)
p
A pool to use to create entries in the hash table
val
The name of the parameter(s) that is wanted. This is tree-structured would be in the form ('*' is all the tree, 'module.*' all of the module , 'module.foo.*', or 'module.foo.bar' )
ht
The hash table to store the results. Keys are item names, and the values point to ap_mgmt_item_t structures.