December 4th Tuesday (十二月 四日 火曜日)
2008-01-07 20:01
435 查看
The hooks in an Apache module is a way to influence or take charge of some aspect of processing.
'post_read_request' This is the first hook available to modules in normal request processing. It is available
to modules that need to hook very early into processing a request.
'translate_name' Apache maps the request URL to the filesystem. A module can insert a hook here to substitute
its own logic -- for example, mod_alias.
'map_to_storage' Since the URL has been mapped to the filesystem, we are now in a position to apply per-directory
configuration. It can enables Apache to determine the configuration options that apply to this request. It applies
normal configuration directives for all active modules, so few modules should ever need to apply hooks here.
'header_parser' This hook inspects the request headers. It is rarely used, as modules perform that task at any point
in the request processing, and they usually do so within the context of another hook.
'access_checker' Apache checks whether access to the requested resource is permitted according to the server configuration.
A module can add to or replace Apache's standard logic, which implements the Allow/Deny From directives in mod_access or
mod_authz_host.
'check_user_id' If any authentication method is in use, Apache will apply the relevant authentication and set the username
field r->user. A module may implement an authentication method with this hook.
'auth_checker' This hook checks whether the requested operation is permitted to the authenticated user.
'type_checker' This hook applies rules related to the MIME type of the requested resource, and determines the content handler
to use.
'fixups' This general-purpose hook enables modules to run any necessary processing after the preceding hooks but before
the content generator.
'handler' This is the content generator hook. It is responsible for sending an appropriate response to the client. If there
are input data, the handler is also responsible for reading them. Unlike the otehr hooks, where zero or many functions may be
involved in processing a request, every request is processed by exactly one handler.
'log_transaction' This hook logs the transaction after the response has been returned to the client. A module may modify or
replace Apache's standard logging.
The general-purpose of every webserver is request processing phases (metadata -> generator -> logger), which is common.
The order of processing centers on the content generator, which is responsible for pulling data from the input filter stack
and pushing data onto the putput filters.
Which hooks we need to create depend on which part or parts of the request our module is interested in.
'post_read_request' This is the first hook available to modules in normal request processing. It is available
to modules that need to hook very early into processing a request.
'translate_name' Apache maps the request URL to the filesystem. A module can insert a hook here to substitute
its own logic -- for example, mod_alias.
'map_to_storage' Since the URL has been mapped to the filesystem, we are now in a position to apply per-directory
configuration. It can enables Apache to determine the configuration options that apply to this request. It applies
normal configuration directives for all active modules, so few modules should ever need to apply hooks here.
'header_parser' This hook inspects the request headers. It is rarely used, as modules perform that task at any point
in the request processing, and they usually do so within the context of another hook.
'access_checker' Apache checks whether access to the requested resource is permitted according to the server configuration.
A module can add to or replace Apache's standard logic, which implements the Allow/Deny From directives in mod_access or
mod_authz_host.
'check_user_id' If any authentication method is in use, Apache will apply the relevant authentication and set the username
field r->user. A module may implement an authentication method with this hook.
'auth_checker' This hook checks whether the requested operation is permitted to the authenticated user.
'type_checker' This hook applies rules related to the MIME type of the requested resource, and determines the content handler
to use.
'fixups' This general-purpose hook enables modules to run any necessary processing after the preceding hooks but before
the content generator.
'handler' This is the content generator hook. It is responsible for sending an appropriate response to the client. If there
are input data, the handler is also responsible for reading them. Unlike the otehr hooks, where zero or many functions may be
involved in processing a request, every request is processed by exactly one handler.
'log_transaction' This hook logs the transaction after the response has been returned to the client. A module may modify or
replace Apache's standard logging.
The general-purpose of every webserver is request processing phases (metadata -> generator -> logger), which is common.
The order of processing centers on the content generator, which is responsible for pulling data from the input filter stack
and pushing data onto the putput filters.
Which hooks we need to create depend on which part or parts of the request our module is interested in.
相关文章推荐
- December 18th Tuesday (十二月 十八日 火曜日)
- December 25th Tuesday (十二月 二十五日 火曜日)
- September 4th Tuesday (九月 四日 火曜日)
- December 11th Tuesday (十二月 十一日 火曜日)
- 2008 March 4th Tuesday (三月 四日 火曜日)
- December 13th Tuesday (十二月 十三日 木曜日)
- Aprial 24th Tuesday (四月 二十四日 火曜日)
- December 6th Thursday (十二月 六日 木曜日)
- 2008 January 22th Tuesday (一月 二十二日 火曜日)
- 2008 March 25th Tuesday (三月 二十五日 火曜日)
- 2008 April 29th Tuesday (四月 二十九日 火曜日)
- 2008 July 8th Tuesday (七月 八日 火曜日)
- 2008 December 4th Thursday
- February 24th Tuesday 2009 (二月 二十四日 火曜日)
- 2009 March 10th Tuesday (三月 十日 火曜日)
- May 5th Tuesday (五月 五日 火曜日)
- December 24th Tuesday 2009
- February 6th Tuesday (一月 六日 火曜日)
- June 4th Monday (六月 四日 日曜日)
- July 4th Wednesday (七月 四日 水曜日)