diff options
author | Yann Ylavic <ylavic@apache.org> | 2020-06-22 10:34:28 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2020-06-22 10:34:28 +0000 |
commit | 3c47401358ce7ed0c72d5fcf08d8582533edf010 (patch) | |
tree | 492643aa7c30232eed89802718ca50b2f6364279 /modules/examples | |
parent | d2c7a48ff6dadfc582e07c3c46920f44e3bcbb78 (diff) | |
download | httpd-3c47401358ce7ed0c72d5fcf08d8582533edf010.tar.gz |
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
Diffstat (limited to 'modules/examples')
-rw-r--r-- | modules/examples/mod_example_hooks.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/examples/mod_example_hooks.c b/modules/examples/mod_example_hooks.c index b6a12cb4b5..ec1df2b665 100644 --- a/modules/examples/mod_example_hooks.c +++ b/modules/examples/mod_example_hooks.c @@ -1176,6 +1176,22 @@ static int x_post_read_request(request_rec *r) /* * This routine gives our module an opportunity to translate the URI into an + * actual filename, before URL decoding happens. + * + * This is a RUN_FIRST hook. + */ +static int x_pre_translate_name(request_rec *r) +{ + /* + * We don't actually *do* anything here, except note the fact that we were + * called. + */ + trace_request(r, "x_pre_translate_name()"); + return DECLINED; +} + +/* + * This routine gives our module an opportunity to translate the URI into an * actual filename. If we don't do anything special, the server's default * rules (Alias directives and the like) will continue to be followed. * @@ -1467,6 +1483,7 @@ static void x_register_hooks(apr_pool_t *p) ap_hook_log_transaction(x_log_transaction, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_http_scheme(x_http_scheme, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_default_port(x_default_port, NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_pre_translate_name(x_pre_translate_name, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_translate_name(x_translate_name, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_map_to_storage(x_map_to_storage, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_header_parser(x_header_parser, NULL, NULL, APR_HOOK_MIDDLE); |