mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Declare pre_translate hook in lua/info/log_debug/example modules, and docs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879077 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1205,6 +1205,11 @@ static int lua_check_user_id_harness_last(request_rec *r)
|
||||
}
|
||||
*/
|
||||
|
||||
static int lua_pre_trans_name_harness(request_rec *r)
|
||||
{
|
||||
return lua_request_rec_hook_harness(r, "pre_translate_name", APR_HOOK_MIDDLE);
|
||||
}
|
||||
|
||||
static int lua_translate_name_harness_first(request_rec *r)
|
||||
{
|
||||
return lua_request_rec_hook_harness(r, "translate_name", AP_LUA_HOOK_FIRST);
|
||||
@@ -1277,6 +1282,21 @@ static int lua_quick_harness(request_rec *r, int lookup)
|
||||
return lua_request_rec_hook_harness(r, "quick", APR_HOOK_MIDDLE);
|
||||
}
|
||||
|
||||
static const char *register_pre_trans_name_hook(cmd_parms *cmd, void *_cfg,
|
||||
const char *file,
|
||||
const char *function)
|
||||
{
|
||||
return register_named_file_function_hook("pre_translate_name", cmd, _cfg, file,
|
||||
function, APR_HOOK_MIDDLE);
|
||||
}
|
||||
|
||||
static const char *register_pre_trans_name_block(cmd_parms *cmd, void *_cfg,
|
||||
const char *line)
|
||||
{
|
||||
return register_named_block_function_hook("pre_translate_name", cmd, _cfg,
|
||||
line);
|
||||
}
|
||||
|
||||
static const char *register_translate_name_hook(cmd_parms *cmd, void *_cfg,
|
||||
const char *file,
|
||||
const char *function,
|
||||
@@ -1848,6 +1868,14 @@ command_rec lua_commands[] = {
|
||||
AP_INIT_TAKE3("LuaAuthzProvider", register_authz_provider, NULL, RSRC_CONF|EXEC_ON_READ,
|
||||
"Provide an authorization provider"),
|
||||
|
||||
AP_INIT_TAKE2("LuaHookPreTranslateName", register_pre_trans_name_hook, NULL,
|
||||
OR_ALL,
|
||||
"Provide a hook for the pre_translate name phase of request processing"),
|
||||
|
||||
AP_INIT_RAW_ARGS("<LuaHookPreTranslateName", register_pre_trans_name_block, NULL,
|
||||
EXEC_ON_READ | OR_ALL,
|
||||
"Provide a hook for the pre_translate name phase of request processing"),
|
||||
|
||||
AP_INIT_TAKE23("LuaHookTranslateName", register_translate_name_hook, NULL,
|
||||
OR_ALL,
|
||||
"Provide a hook for the translate name phase of request processing"),
|
||||
@@ -2101,6 +2129,9 @@ static void lua_register_hooks(apr_pool_t *p)
|
||||
APR_HOOK_MIDDLE);
|
||||
|
||||
/* http_request.h hooks */
|
||||
ap_hook_pre_translate_name(lua_pre_trans_name_harness, NULL, NULL,
|
||||
APR_HOOK_MIDDLE);
|
||||
|
||||
ap_hook_translate_name(lua_translate_name_harness_first, NULL, NULL,
|
||||
AP_LUA_HOOK_FIRST);
|
||||
ap_hook_translate_name(lua_translate_name_harness, NULL, NULL,
|
||||
|
Reference in New Issue
Block a user