[��Â����]Apache 2.0 �� hook ����(apache module ��ȯ����� ����3-3)
�ºݤΤȤ����褯ʬ���äƤʤ���ʬ�⤢�ä��Τǡ�hook �˴ؤ��ƤޤȤ�Ƥߤޤ�����
���Υڡ����ε��ҤˤĤ���
- ���Υڡ��������Ƥ˴ؤ���
- �Ѹ��ʸ�Ϥϡ����� Apache 2.0.58 �Υ������������椫�齸��Ƥ�����ʸ�ޥޤǤ���
- ���Ƥ� hook �˴ؤ���Ĵ�ٿԤ�����������ʤ��ΤǴְ㤤�⤢��Ȼפ��ޤ����ְ㤤�˵��Ť��줿���ϥ����Ȥǻ�Ŧ����������й����Ǥ� m(_ _)m
- hook �θƤӽФ�����˴ؤ���
- hook ���ƤӽФ�������ϡ������������ס֥ץ�����������ס֥��ͥ������ס֥ꥯ�����ȡפ˴ؤ��Ƥϵ��Ҥ�������ǸƤӽФ����褦�Ǥ���
- RUN_ALL��RUN_FIRST �ˤĤ���
- RUN_FIRST �� hook �ϡ��ƤӽФ��� hook �����ؿ��� OK ��
DECLINE���顼���֤�����硤���μ��� hook �����ؿ���ƤӽФ��ޤ��� - RUN_ALL �� hook �ϡ��ƤӽФ��� hook �����ؿ������顼���֤��ʤ��¤ꡤ��Ͽ����Ƥ������Ƥ� hook �����ؿ���ƤӽФ��ޤ���
- hook ��Ͽ�ؿ� ap_hook_xxx() �ΰ����ˤĤ���
- ap_hook_xxx() �ؤΰ���������Ʊ���Ǥ������ƤˤĤ��Ƥϡ��������򻲾Ȥ���������
- ��Ͽ���� hook �����ؿ��Υץ��ȥ����פϡ��� hook ��Ͽ�ؿ��������β���ʻ�����Ƥ��ޤ���
Index
����
ap_hook_pre_config() | RUN_ALL | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Run the pre_config function for each module | |||||||||||
|
ap_hook_open_logs() | RUN_ALL | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Run the open_logs functions for each module | |||||||||||||
|
ap_hook_post_config() | RUN_ALL | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Run the post_config function for each module | |||||||||||||
|
ap_hook_optional_fn_retrieve() | |||
---|---|---|---|
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. | |||
|
ap_hook_pre_mpm() | RUN_ALL | |||||||
---|---|---|---|---|---|---|---|---|
Hook for post scoreboard creation, pre mpm. | ||||||||
|
ap_hook_child_init() | |||||||
---|---|---|---|---|---|---|---|
Run the child_init functions for each module | |||||||
|
ap_hook_create_connection() | RUN_FIRST | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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. | |||||||||||||||||
|
ap_hook_pre_connection() | RUN_ALL | ||||||||
---|---|---|---|---|---|---|---|---|---|
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()ľ��˸ƤФ�� | |||||||||
|
ap_hook_process_connection() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
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. | |||||||
|
ap_hook_create_request() | RUN_ALL | ||||||
---|---|---|---|---|---|---|---|
Gives modules a chance to create their request_config entry when the request is created. | |||||||
|
ap_hook_post_read_request() | RUN_ALL | ||||||
---|---|---|---|---|---|---|---|
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 | |||||||
|
ap_hook_quick_handler() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
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 ����°ʸ���ˤ��С�����å���⥸�塼�뤬���Ѥ��Ƥ��롥 | |||||||
|
ap_hook_translate_name() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
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. | |||||||
|
ap_hook_map_to_storage() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
This hook allow modules to set the per_dir_config based on their own
context (such as | |||||||
|
ap_hook_header_parser() | RUN_ALL | ||||||
---|---|---|---|---|---|---|---|
Run the header parser functions for each module | |||||||
|
ap_hook_access_checker() | RUN_ALL | ||||||
---|---|---|---|---|---|---|---|
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. | |||||||
|
ap_hook_check_user_id() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
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. | |||||||
|
ap_hook_auth_checker() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
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). | |||||||
|
ap_hook_type_checker() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
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. | |||||||
|
ap_hook_fixups() | RUN_ALL | ||||||
---|---|---|---|---|---|---|---|
Allows modules to perform module-specific fixing of header fields. This is invoked just before any content-handler | |||||||
|
ap_hook_insert_filter() | |||||
---|---|---|---|---|---|
This hook allows modules to insert filters for the current request | |||||
|
ap_hook_handler() | RUN_FIRST | ||||
---|---|---|---|---|---|
Run the handler functions for each module non-wildcard handlers should HOOK_MIDDLE, wildcard HOOK_LAST | |||||
|
ap_hook_log_transaction() | RUN_ALL | ||||||
---|---|---|---|---|---|---|---|
This hook allows modules to perform any module-specific logging activities over and above the normal server things. | |||||||
|
ap_hook_insert_error_filter() | |||||
---|---|---|---|---|---|
This hook allows modules to insert filters for the current error response | |||||
|
ap_hook_error_log() | |||
---|---|---|---|
|
ap_hook_default_port() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
Return the default port from the current request | |||||||
|
ap_hook_http_method() | RUN_FIRST | ||||||
---|---|---|---|---|---|---|---|
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() ���ѹ�����Ƥ��ޤ��� | |||||||
|
ap_hook_fatal_exception() | RUN_ALL | ||
---|---|---|---|
|
ap_hook_get_mgmt_items() | RUN_ALL | ||||||||
---|---|---|---|---|---|---|---|---|---|
This hook provdes a way for modules to provide metrics/statistics about their operational status. | |||||||||
|
ap_hook_get_suexec_identity() | RUN_FIRST | ||
---|---|---|---|
|
�ȥ�å��Хå�URL
���ε����ؤΥȥ�å��Хå�
���ε����ؤΥ�����
�ʲ���apr_hooks.h
#define APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ns,link,ret,name,args_decl,args_use,decline) \
APR_IMPLEMENT_EXTERNAL_HOOK_BASE(ns,link,name) \
link##_DECLARE(ret) ns##_run_##name args_decl \
{ \
ns##_LINK_##name##_t *pHook; \
int n; \
ret rv; \
\
if(!_hooks.link_##name) \
return decline; \
\
pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
{ \
rv=pHook[n].pFunc args_use; \
\
if(rv != decline) \
return rv; \
} \
return decline; \
}
�󤲤Ƥ����������ޥ�������ϡ�apache �� hook ��������뤿��Υޥ����Ǥ��͡�RUN_ALL �� hook ��Ʊ�ͤΥޥ�����Ȥä��������Ƥ��ޤ���
�ǡ�����Ŧ��ĺ���Ƥ���ΤϤ��ε����Ǥ������ǡ�RUN_FIRST �Ѥ� hook �����ؿ��� DECLINE ���֤����Ȥ���ư��˴ؤ��Ƥλ����Ȼפ��ޤ���
��ǧ���Ƥߤ��Ȥ����Τ��˴ְ�äƤ���ޤ����Τǡ������������ޤ�����
����Ŧ���꤬�Ȥ��������ޤ�����