]> granicus.if.org Git - apache/commitdiff
Provide apr_pool_t arg to register_hooks, since anything they do in that
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 17 Jan 2001 15:52:12 +0000 (15:52 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 17 Jan 2001 15:52:12 +0000 (15:52 +0000)
  step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68

48 files changed:
include/http_config.h
modules/aaa/mod_access.c
modules/aaa/mod_auth.c
modules/aaa/mod_auth_anon.c
modules/aaa/mod_auth_db.c
modules/aaa/mod_auth_dbm.c
modules/aaa/mod_auth_digest.c
modules/cache/mod_file_cache.c
modules/dav/fs/mod_dav_fs.c
modules/dav/main/liveprop.c
modules/dav/main/mod_dav.c
modules/dav/main/providers.c
modules/echo/mod_echo.c
modules/experimental/mod_cache.c
modules/experimental/mod_charset_lite.c
modules/experimental/mod_disk_cache.c
modules/experimental/mod_example.c
modules/experimental/mod_generic_hook_export.c
modules/experimental/mod_generic_hook_import.c
modules/filters/mod_include.c
modules/generators/mod_asis.c
modules/generators/mod_autoindex.c
modules/generators/mod_cgi.c
modules/generators/mod_cgid.c
modules/generators/mod_info.c
modules/generators/mod_status.c
modules/generators/mod_suexec.c
modules/http/http_core.c
modules/http/mod_mime.c
modules/loggers/mod_log_config.c
modules/mappers/mod_actions.c
modules/mappers/mod_alias.c
modules/mappers/mod_dir.c
modules/mappers/mod_imap.c
modules/mappers/mod_negotiation.c
modules/mappers/mod_rewrite.c
modules/mappers/mod_speling.c
modules/mappers/mod_userdir.c
modules/mappers/mod_vhost_alias.c
modules/metadata/mod_cern_meta.c
modules/metadata/mod_env.c
modules/metadata/mod_expires.c
modules/metadata/mod_headers.c
modules/metadata/mod_mime_magic.c
modules/metadata/mod_setenvif.c
modules/metadata/mod_unique_id.c
modules/metadata/mod_usertrack.c
modules/proxy/mod_proxy.c

index f691b3ddecc58784276f43ec17d315d4476db7cb..67c063efd969d543dda40f3b228775c02cbe4890 100644 (file)
@@ -396,9 +396,10 @@ struct module_struct {
      *  In this function, modules should call the ap_hook_*() functions to
      *  register an interest in a specific step in processing the current
      *  request.
+     *  @param p the pool to use for all allocations
      *  @deffunc void register_hooks(void)
      */
-    void (*register_hooks) (void);
+    void (*register_hooks) (apr_pool_t *p);
 };
 
 /* Initializer for the first few module slots, which are only
index e7c8510b7096976bb6bac76ab6e3fa6bdf2b4417..1e7f705e46d99a01ffdddd600c7d9c5888d18961 100644 (file)
@@ -406,7 +406,7 @@ static int check_dir_access(request_rec *r)
     return ret;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_access_checker(check_dir_access,NULL,NULL,AP_HOOK_MIDDLE);
 }
index 4d6a4dbc31cfe4a31174bfc2565b85ee64f16f8b..0fd9ba6a42e4eba38b85b3377aa75464c4bf7834 100644 (file)
@@ -318,7 +318,7 @@ static int check_user_access(request_rec *r)
     return HTTP_UNAUTHORIZED;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_check_user_id(authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE);
     ap_hook_auth_checker(check_user_access,NULL,NULL,AP_HOOK_MIDDLE);
index 703aa00a0549eb0c603a485b1f7eebfc067ef729..ec69551119f7d2cf26ea011a325784f62c486827 100644 (file)
@@ -294,7 +294,8 @@ static int check_anon_access(request_rec *r)
 #endif
     return DECLINED;
 }
-static void register_hooks(void)
+
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_check_user_id(anon_authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE);
     ap_hook_auth_checker(check_anon_access,NULL,NULL,AP_HOOK_MIDDLE);
index 552e2b798941c60db6c63b667e165ac39587049c..610b14a740a0b227934213286330db795a6638c2 100644 (file)
@@ -395,7 +395,7 @@ static int db_check_auth(request_rec *r)
     return DECLINED;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_check_user_id(db_authenticate_basic_user,NULL,NULL,AP_HOOK_MIDDLE);
     ap_hook_auth_checker(db_check_auth,NULL,NULL,AP_HOOK_MIDDLE);
index 7399aa036ff396ddb4e55850f50b20c28c877582..8b8048bbb441f1a919dc6948594e9bab51c256c0 100644 (file)
@@ -335,7 +335,7 @@ static int dbm_check_auth(request_rec *r)
     return DECLINED;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_check_user_id(dbm_authenticate_basic_user, NULL, NULL, AP_HOOK_MIDDLE);
     ap_hook_auth_checker(dbm_check_auth, NULL, NULL, AP_HOOK_MIDDLE);
index b7601107f1165f0b864c897fbe9a86e2bafd48a3..edd95d96043d208c0a0f01132fc5c83634746f72 100644 (file)
@@ -2049,7 +2049,7 @@ static int add_auth_info(request_rec *r)
 }
 
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     static const char * const cfgPost[]={ "http_core.c", NULL };
     static const char * const parsePre[]={ "mod_proxy.c", NULL };
index 25c3886b4c76376e8da89035aeb27aca686be21c..c853332680a0f67e52198225ae3c4016e1427c1d 100644 (file)
@@ -167,6 +167,7 @@ static apr_status_t open_file(apr_file_t **file, const char *filename, int flg1,
      * support.
      */
     HANDLE hFile;
+    /* XXX: This is wrong for unicode FS ... and it doesn't belong in httpd */
     hFile = CreateFile(filename,          /* pointer to name of the file */
                        GENERIC_READ,      /* access (read-write) mode */
                        FILE_SHARE_READ,   /* share mode */
@@ -498,7 +499,7 @@ AP_INIT_ITERATE("mmapfile", mmapfile, NULL, RSRC_CONF,
     {NULL}
 };
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(file_cache_handler, NULL, NULL, AP_HOOK_LAST);
     ap_hook_post_config(file_cache_post_config, NULL, NULL, AP_HOOK_MIDDLE);
index 20d2c32110449dae5cb043e0c8733f4361c7bfc3..324019f2185f0d643acb89329cc155dac2da3cff 100644 (file)
@@ -119,7 +119,7 @@ static const command_rec dav_fs_cmds[] =
     { NULL }
 };
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_gather_propsets(dav_fs_gather_propsets, NULL, NULL,
                             AP_HOOK_MIDDLE);
@@ -127,7 +127,7 @@ static void register_hooks(void)
     ap_hook_insert_all_liveprops(dav_fs_insert_all_liveprops, NULL, NULL,
                                  AP_HOOK_MIDDLE);
 
-    dav_fs_register(NULL /* ### pconf */);
+    dav_fs_register(p);
 }
 
 module AP_MODULE_DECLARE_DATA dav_fs_module =
index ec477b7a1c62628b3262750e3f0e06f2b91a4f49..120626b937d4b4053b43357cd776a237ba0e86e4 100644 (file)
 #include "apr_hash.h"
 #include "apr_errno.h"
 #include "apr_strings.h"
-
-#include "ap_hooks.h"   /* ### for ap_global_hook_pool */
 #include "util_xml.h"   /* for ap_text_header */
-
 #include "mod_dav.h"
 
 
@@ -78,9 +75,6 @@ static void dav_register_liveprop_namespace(apr_pool_t *p, const char *uri)
 {
     int value;
 
-    /* ### ignore the pool; it is NULL right now */
-    p = ap_global_hook_pool;
-
     if (dav_liveprop_uris == NULL) {
         dav_liveprop_uris = apr_make_hash(p);
         apr_register_cleanup(p, NULL, dav_cleanup_liveprops, apr_null_cleanup);
index f273ff8129dee31dddef5db52ccd851eb7a4de65..c921806366b223a0e0bf2fa4c855fae84b62dd03 100644 (file)
@@ -4005,7 +4005,7 @@ static int dav_type_checker(request_rec *r)
     return DECLINED;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(dav_handler, NULL, NULL, AP_HOOK_MIDDLE);
     ap_hook_post_config(dav_init_handler, NULL, NULL, AP_HOOK_MIDDLE);
@@ -4015,8 +4015,7 @@ static void register_hooks(void)
     ap_hook_insert_all_liveprops(dav_core_insert_all_liveprops,
                                  NULL, NULL, AP_HOOK_MIDDLE);
 
-    /* ### damn. need a pool. */
-    dav_core_register_uris(NULL);
+    dav_core_register_uris(p);
 }
 
 /*---------------------------------------------------------------------------
index 1a534514dfdaee221baad780e91e244f5cd3fbd4..e5071c93a04e9bd30ec70d685acb685705f246ef 100644 (file)
@@ -54,9 +54,6 @@
 
 #include "apr_pools.h"
 #include "apr_hash.h"
-
-#include "ap_hooks.h"   /* ### for ap_global_hook_pool */
-
 #include "mod_dav.h"
 
 
@@ -72,9 +69,6 @@ static apr_status_t dav_cleanup_providers(void *ctx)
 DAV_DECLARE(void) dav_register_provider(apr_pool_t *p, const char *name,
                                         const dav_provider *provider)
 {
-    /* ### ignore the pool; it is NULL right now */
-    p = ap_global_hook_pool;
-
     if (dav_repos_providers == NULL) {
         dav_repos_providers = apr_make_hash(p);
         apr_register_cleanup(p, NULL, dav_cleanup_providers, apr_null_cleanup);
index a5e17d08aa160b84bdea9eb6f886f2dd6f498ba9..e52ca1cf50a55f4da40209b3eeaadda8e0dfe588 100644 (file)
@@ -119,7 +119,7 @@ static const command_rec echo_cmds[] =
     { NULL }
 };
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_process_connection(process_echo_connection, NULL, NULL,
                                AP_HOOK_MIDDLE);
index 003156dc26f9f379dcac07966f1da3b4599dc687..946503ce10d75b60ef61509e13f82c3c2bc10633 100644 (file)
@@ -107,7 +107,7 @@ static int cache_filter(ap_filter_t *f, ap_bucket_brigade *bb)
     return APR_SUCCESS;        
 }
 
-static void cache_register_hook(void)
+static void cache_register_hook(apr_pool_t *p)
 {
     ap_register_output_filter("CACHE", cache_filter, AP_FTYPE_HTTP_HEADER);
 }
index 9d7769cdfe498d533cbce6d4eae7af1846304fe8..33bdf28be1aabba984e832faea995e3ef502d6a3 100644 (file)
@@ -1119,7 +1119,7 @@ static const command_rec cmds[] =
     {NULL}
 };
 
-static void charset_register_hooks(void)
+static void charset_register_hooks(apr_pool_t *p)
 {
     ap_hook_fixups(find_code_page, NULL, NULL, AP_HOOK_MIDDLE);
     ap_hook_insert_filter(xlate_insert_filter, NULL, NULL, AP_HOOK_MIDDLE);
index 277c01188db165c6b52e1d52c7f46cd29408cf02..a32f5b09dd953370b3cf6381ac2509f3c8982ae9 100644 (file)
@@ -153,7 +153,7 @@ static int disk_cache(request_rec *r, ap_bucket_brigade *bb, void **cf)
     return OK; 
 }
 
-static void disk_cache_register_hook(void)
+static void disk_cache_register_hook(apr_pool_t *p)
 {
     ap_hook_store_cache(disk_cache, NULL, NULL, AP_HOOK_MIDDLE);
     ap_hook_serve_cache(disk_serve, NULL, NULL, AP_HOOK_MIDDLE);
index 0d6bad0d33e90d874d91523a4b998a54995bd4e6..ea96362c2c5a592cb5ddcf18e3871701c1698d0a 100644 (file)
@@ -1090,7 +1090,7 @@ static int example_header_parser(request_rec *r)
  * The actual delivery of content to the browser [9] is not handled by
  * a hook; see the handler declarations below.
  */
-static void example_register_hooks(void)
+static void example_register_hooks(apr_pool_t *p)
 {
     /* module initializer */
     ap_hook_post_config(example_init,
index 01d9c68369523f436f5c21bc70d8b1faf1ac59d1..3029aea260485c07eb59ca147491afa7852c788d 100644 (file)
@@ -65,7 +65,7 @@ static int ExportLogTransaction(request_rec *r)
     return ap_run_generic_hook_test(r->the_request);
 }
 
-static void ExportRegisterHooks(void)
+static void ExportRegisterHooks(apr_pool_t *p)
 {
     ap_hook_log_transaction(ExportLogTransaction,NULL,NULL,AP_HOOK_MIDDLE);
 }
index 74d573f27194b2993687a151f3504ad0c6893ca4..e73f23a808c852faaa3f222f25d4b626418d218d 100644 (file)
@@ -65,7 +65,7 @@ static int ImportGenericHookTestHook(const char *szStr)
     return OK;
 }
 
-static void ImportRegisterHooks(void)
+static void ImportRegisterHooks(apr_pool_t *p)
 {
     AP_HOOK_GENERIC(generic_hook_test,ImportGenericHookTestHook,NULL,NULL,
                    AP_HOOK_MIDDLE);
index a9e549794d1572cdd5fb8f16c22468a8dc4e8a3d..a86b78807fa5fd64d285ad49d030ba109bcb1cb4 100644 (file)
@@ -3065,7 +3065,7 @@ static const command_rec includes_cmds[] =
     {NULL}
 };
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_post_config(include_post_config, NULL, NULL, AP_HOOK_REALLY_FIRST);
     ap_register_output_filter("INCLUDES", includes_filter, AP_FTYPE_CONTENT);
index 6b7de1d27f128f895eb18d33e35f92241c533f42..cb65f20272abe0a9865878e869e93e5e7bdcb4b9 100644 (file)
@@ -124,7 +124,7 @@ static int asis_handler(request_rec *r)
     return OK;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(asis_handler,NULL,NULL,AP_HOOK_MIDDLE);
 }
index d4734ff93c1b2b275ef421624c089f433efbc5ad..54357cd8d9856b035ed44b775dc34f6a69cf6fa5 100644 (file)
@@ -1698,7 +1698,7 @@ static int handle_autoindex(request_rec *r)
     }
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(handle_autoindex,NULL,NULL,AP_HOOK_MIDDLE);
 }
index 8ccc223627bef0a232c23a9282eb76e0a6d1fed0..b293a4a8508d57db5a2ac314466658c33912a04b 100644 (file)
@@ -720,7 +720,7 @@ static int cgi_handler(request_rec *r)
     return OK;                 /* NOT r->status, even if it has changed. */
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(cgi_handler, NULL, NULL, AP_HOOK_MIDDLE);
 }
index 2155a839e64b7b5da9b77c2ff877187906711d5d..afca7e4353298d1108090c5023b4ee5262bfcee7 100644 (file)
@@ -931,7 +931,7 @@ static int cgid_handler(request_rec *r)
     return OK; /* NOT r->status, even if it has changed. */ 
 } 
 
-static void register_hook(void)
+static void register_hook(apr_pool_t *p)
 {
     ap_hook_post_config(cgid_init, NULL, NULL, AP_HOOK_MIDDLE);
     ap_hook_handler(cgid_handler, NULL, NULL, AP_HOOK_MIDDLE);
index e4997b9bea4db2e5edf3795d516e71c791fc47df..6117d9c642f104610b88a231cc80c9bec2d72181 100644 (file)
@@ -466,7 +466,7 @@ static const command_rec info_cmds[] =
     {NULL}
 };
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(display_info, NULL, NULL, AP_HOOK_MIDDLE);
 }
index 4e204b6e25cc03e51dfa9b79d4b482a1d1a7474a..ec4038cd7e8fb86e01395f001714fa07ad492d50 100644 (file)
@@ -124,7 +124,7 @@ static int status_handler(request_rec *r)
     return 0;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(status_handler, NULL, NULL, AP_HOOK_MIDDLE);
 }
index adf10f4458f25ffc6da24072b1d9da62f1d761c0..7ecc65e59f26e760d5b105891ae9506e89bce27e 100644 (file)
@@ -141,7 +141,7 @@ static const command_rec suexec_cmds[] =
     { NULL }
 };
 
-static void suexec_hooks(void)
+static void suexec_hooks(apr_pool_t *p)
 {
     ap_hook_get_suexec_identity(get_suexec_id_doer,NULL,NULL,AP_HOOK_MIDDLE);
 }
index 312bca727f7926190ceeb2721e682589e4cac607..f14cdf1eae2d23007400eb9608674324ef3ea64d 100644 (file)
@@ -1014,6 +1014,7 @@ AP_DECLARE (file_type_e) ap_get_win32_interpreter(const  request_rec *r,
     }        
 
     /* Need to peek into the file figure out what it really is... */
+    /* This is wrong for Unicode FS ... should move to APR */
     hFile = CreateFile(r->filename, GENERIC_READ, FILE_SHARE_READ, NULL,
                        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
     if (hFile == INVALID_HANDLE_VALUE) {
@@ -3542,7 +3543,7 @@ static void core_insert_filter(request_rec *r)
     }
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_pre_config(core_pre_config, NULL, NULL, AP_HOOK_REALLY_FIRST);
     ap_hook_post_config(core_post_config,NULL,NULL,AP_HOOK_REALLY_FIRST);
index 6cbd5f7e0e7b93688630bcf6113bd8d14740e497..bca6ae6d9ee985a2df169c3bad07488ba7f16c53 100644 (file)
@@ -840,7 +840,7 @@ static void mime_insert_filter(request_rec *r)
     apr_table_do(filter_chain, r, conf->filter_names, r->content_type, NULL);
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_type_checker(find_ct,NULL,NULL,AP_HOOK_MIDDLE);
     ap_hook_post_config(mime_post_config,NULL,NULL,AP_HOOK_MIDDLE);
index a565010f30803ba3c7e1fea50c314b0b8db64b58..2c37090b2aac48f536d780644a4c995bb704147e 100644 (file)
@@ -1241,7 +1241,7 @@ static void init_child(apr_pool_t *p, server_rec *s)
 #endif
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_child_init(init_child,NULL,NULL,AP_HOOK_MIDDLE);
     ap_hook_open_logs(init_config_log,NULL,NULL,AP_HOOK_MIDDLE);
index 5c400bc477cb80d1bdb0ab1f4f60b223896bd043..68ece9badd5d23db5f71f2527f2c1ed802b67b9f 100644 (file)
@@ -209,7 +209,7 @@ static int action_handler(request_rec *r)
     return OK;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(action_handler,NULL,NULL,AP_HOOK_LAST);
 }
index 40e5cf560bc1ead7153e15b3a7ebcd529c9c5e67..766c047189b33a5bc35daacdfcc3a974bce35f3d 100644 (file)
@@ -420,7 +420,7 @@ static int fixup_redir(request_rec *r)
     return DECLINED;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     static const char * const aszPre[]={ "mod_userdir.c",NULL };
 
index 9d305da8621c256c52c6d0e2c164fd20c7469bd1..58077e88ed0d9294eb193febcea0b3e41b09d31f 100644 (file)
@@ -221,8 +221,7 @@ static int handle_dir(request_rec *r)
     return DECLINED;
 }
 
-
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     static const char * const aszSucc[]={ "mod_autoindex.c", NULL };
 
index f3781dd5201acc50bb4e26677417197a9011701e..877a440965bf297bd7b118658a233b0186762443 100644 (file)
@@ -913,7 +913,7 @@ menu_bail:
     return HTTP_INTERNAL_SERVER_ERROR;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_handler(imap_handler,NULL,NULL,AP_HOOK_MIDDLE);
 }
index a7add86bf6dce8783b2f4456cb8e799751ab12c6..d85fb4993207d36666ecafc0ad8f5f4d0ce9540d 100644 (file)
@@ -2745,7 +2745,7 @@ static int fix_encoding(request_rec *r)
     return DECLINED;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_fixups(fix_encoding,NULL,NULL,AP_HOOK_MIDDLE);
     ap_hook_type_checker(handle_multi,NULL,NULL,AP_HOOK_FIRST);
index d170cbe28cc23003a4d38edccbcbe488cdc4196f..f1a014f69076cbc0cc701aae5d63c33a5e18282d 100644 (file)
      * MODULE-DEFINITION-END
      */
 
-    /* the apr_table_t of commands we provide */
-static const command_rec command_table[] = {
-    AP_INIT_FLAG(    "RewriteEngine",   cmd_rewriteengine,  NULL, OR_FILEINFO,
-                     "On or Off to enable or disable (default) the whole "
-                     "rewriting engine"),
-    AP_INIT_ITERATE( "RewriteOptions",  cmd_rewriteoptions,  NULL, OR_FILEINFO,
-                     "List of option strings to set"),
-    AP_INIT_TAKE1(   "RewriteBase",     cmd_rewritebase,     NULL, OR_FILEINFO, 
-                     "the base URL of the per-directory context"),
-    AP_INIT_RAW_ARGS("RewriteCond",     cmd_rewritecond,     NULL, OR_FILEINFO,
-                     "an input string and a to be applied regexp-pattern"),
-    AP_INIT_RAW_ARGS("RewriteRule",     cmd_rewriterule,     NULL, OR_FILEINFO,
-                     "an URL-applied regexp-pattern and a substitution URL"),
-    AP_INIT_TAKE2(   "RewriteMap",      cmd_rewritemap,      NULL, RSRC_CONF,
-                     "a mapname and a filename"),
-    AP_INIT_TAKE1(   "RewriteLock",     cmd_rewritelock,     NULL, RSRC_CONF,
-                     "the filename of a lockfile used for inter-process "
-                     "synchronization"),
-    AP_INIT_TAKE1(   "RewriteLog",      cmd_rewritelog,      NULL, RSRC_CONF,
-                     "the filename of the rewriting logfile"),
-    AP_INIT_TAKE1(   "RewriteLogLevel", cmd_rewriteloglevel, NULL, RSRC_CONF,
-                     "the level of the rewriting logfile verbosity "
-                     "(0=none, 1=std, .., 9=max)"),
-    { NULL }
-};
-
-static void register_hooks(void)
-{
-    ap_hook_handler(handler_redirect, NULL, NULL, AP_HOOK_MIDDLE);
-    ap_hook_post_config(init_module,NULL,NULL,AP_HOOK_MIDDLE);
-    ap_hook_child_init(init_child,NULL,NULL,AP_HOOK_MIDDLE);
-
-    ap_hook_fixups(hook_fixup,NULL,NULL,AP_HOOK_FIRST);
-    ap_hook_translate_name(hook_uri2file,NULL,NULL,AP_HOOK_FIRST);
-    ap_hook_type_checker(hook_mimetype,NULL,NULL,AP_HOOK_MIDDLE);
-}
-
-    /* the main config structure */
-module AP_MODULE_DECLARE_DATA rewrite_module = {
-   STANDARD20_MODULE_STUFF,
-   config_perdir_create,        /* create per-dir    config structures */
-   config_perdir_merge,         /* merge  per-dir    config structures */
-   config_server_create,        /* create per-server config structures */
-   config_server_merge,         /* merge  per-server config structures */
-   command_table,               /* apr_table_t of config file commands  */
-   register_hooks               /* register hooks                      */
-};
+    /* the module (predeclaration) */
+module AP_MODULE_DECLARE_DATA rewrite_module;
 
     /* the cache */
 static cache *cachep;
@@ -4144,5 +4099,53 @@ int main(int argc, char *argv[])
     ExitThread(TSR_THREAD, 0);
 }
 #endif
+
+    /* the apr_table_t of commands we provide */
+static const command_rec command_table[] = {
+    AP_INIT_FLAG(    "RewriteEngine",   cmd_rewriteengine,  NULL, OR_FILEINFO,
+                     "On or Off to enable or disable (default) the whole "
+                     "rewriting engine"),
+    AP_INIT_ITERATE( "RewriteOptions",  cmd_rewriteoptions,  NULL, OR_FILEINFO,
+                     "List of option strings to set"),
+    AP_INIT_TAKE1(   "RewriteBase",     cmd_rewritebase,     NULL, OR_FILEINFO, 
+                     "the base URL of the per-directory context"),
+    AP_INIT_RAW_ARGS("RewriteCond",     cmd_rewritecond,     NULL, OR_FILEINFO,
+                     "an input string and a to be applied regexp-pattern"),
+    AP_INIT_RAW_ARGS("RewriteRule",     cmd_rewriterule,     NULL, OR_FILEINFO,
+                     "an URL-applied regexp-pattern and a substitution URL"),
+    AP_INIT_TAKE2(   "RewriteMap",      cmd_rewritemap,      NULL, RSRC_CONF,
+                     "a mapname and a filename"),
+    AP_INIT_TAKE1(   "RewriteLock",     cmd_rewritelock,     NULL, RSRC_CONF,
+                     "the filename of a lockfile used for inter-process "
+                     "synchronization"),
+    AP_INIT_TAKE1(   "RewriteLog",      cmd_rewritelog,      NULL, RSRC_CONF,
+                     "the filename of the rewriting logfile"),
+    AP_INIT_TAKE1(   "RewriteLogLevel", cmd_rewriteloglevel, NULL, RSRC_CONF,
+                     "the level of the rewriting logfile verbosity "
+                     "(0=none, 1=std, .., 9=max)"),
+    { NULL }
+};
+
+static void register_hooks(apr_pool_t *p)
+{
+    ap_hook_handler(handler_redirect, NULL, NULL, AP_HOOK_MIDDLE);
+    ap_hook_post_config(init_module,NULL,NULL,AP_HOOK_MIDDLE);
+    ap_hook_child_init(init_child,NULL,NULL,AP_HOOK_MIDDLE);
+
+    ap_hook_fixups(hook_fixup,NULL,NULL,AP_HOOK_FIRST);
+    ap_hook_translate_name(hook_uri2file,NULL,NULL,AP_HOOK_FIRST);
+    ap_hook_type_checker(hook_mimetype,NULL,NULL,AP_HOOK_MIDDLE);
+}
+
+    /* the main config structure */
+module AP_MODULE_DECLARE_DATA rewrite_module = {
+   STANDARD20_MODULE_STUFF,
+   config_perdir_create,        /* create per-dir    config structures */
+   config_perdir_merge,         /* merge  per-dir    config structures */
+   config_server_create,        /* create per-server config structures */
+   config_server_merge,         /* merge  per-server config structures */
+   command_table,               /* apr_table_t of config file commands  */
+   register_hooks               /* register hooks                      */
+};
  
 /*EOF*/
index ef4e80b08d3ce17c92f17c9c99a3803e7635c2f5..b4151202cd59d619f2f2f764714ae509e78df39f 100644 (file)
@@ -551,7 +551,7 @@ static int check_speling(request_rec *r)
     return OK;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_fixups(check_speling,NULL,NULL,AP_HOOK_LAST);
 }
index e4eb99ac791e873a83d7cef981eb0d29268e2139..ef54d0ffe1fba81d6075882134afe30d5eaf5784 100644 (file)
@@ -384,7 +384,7 @@ static ap_unix_identity_t *get_suexec_id_doer(const request_rec *r)
 }
 #endif /* HAVE_UNIX_SUEXEC */
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     static const char * const aszSucc[]={ "mod_alias.c",NULL };
 
index c3654c5dce2c530c2e0d172ed1ea411c265d44d8..85b28740543b63de5e7129760efd66c3be326e56 100644 (file)
@@ -469,7 +469,7 @@ static int mva_translate(request_rec *r)
     return OK;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_translate_name(mva_translate, NULL, NULL, AP_HOOK_MIDDLE);
 }
index 0c2d3db5051745e0bb39e412c8ee609c87627282..491068c33e42f4d6bee4b89f55ccd1525e276367 100644 (file)
@@ -385,10 +385,12 @@ static int add_cern_meta_data(request_rec *r)
 
     return rv;
 }
-static void register_hooks(void)
+
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_fixups(add_cern_meta_data,NULL,NULL,AP_HOOK_MIDDLE);
 }
+
 module AP_MODULE_DECLARE_DATA cern_meta_module =
 {
     STANDARD20_MODULE_STUFF,
index 732f6c82eb69d1657511a8ed1c5a9defbca0e802..6e6f4a9490b1dcd5ff5e2a22108e4c39e26f73bb 100644 (file)
@@ -254,12 +254,11 @@ static int fixup_env_module(request_rec *r)
     return OK;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_fixups(fixup_env_module,NULL,NULL,AP_HOOK_MIDDLE);
 }
 
-
 module AP_MODULE_DECLARE_DATA env_module =
 {
     STANDARD20_MODULE_STUFF,
index d06268966a0cd9f66637adb4482601ba4cde14f8..e9f2a444418a90cabdca02b50775caefeb592cc6 100644 (file)
@@ -503,7 +503,7 @@ static int add_expires(request_rec *r)
     return OK;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_fixups(add_expires,NULL,NULL,AP_HOOK_MIDDLE);
 }
index 4bf81a49a9024588de7144f8c6998fbf41568f89..f866dfcaf1de935a7f9b7036e01aa71b1ba413d6 100644 (file)
@@ -250,10 +250,12 @@ static int fixup_headers(request_rec *r)
 
     return DECLINED;
 }
-static void register_hooks(void)
+
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_fixups(fixup_headers,NULL,NULL,AP_HOOK_MIDDLE);
 } 
+
 module AP_MODULE_DECLARE_DATA headers_module =
 {
     STANDARD20_MODULE_STUFF,
index b426cf8eb270fc965f4f3d5c2c238e8fab09ee87..6294a000353e491d26fef1dcfa682ce0063e45d7 100644 (file)
@@ -2463,7 +2463,7 @@ static int magic_find_ct(request_rec *r)
     return magic_rsl_to_request(r);
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     static const char * const aszPre[]={ "mod_mime.c", NULL };
 
index c4c5fbb0a1bfaaf848f787210085dc6e241e8161..a5220ea697cd17434f92a61ef6f8533e0ec919b7 100644 (file)
@@ -452,7 +452,7 @@ static int match_headers(request_rec *r)
     return DECLINED;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_header_parser(match_headers, NULL, NULL, AP_HOOK_MIDDLE);
     ap_hook_post_read_request(match_headers, NULL, NULL, AP_HOOK_MIDDLE);
index d2604a1c8935838a1b2aedb35ce99a70f9d8414a..16a02a5fa47cb459878d4960d30747d565e0cdd5 100644 (file)
@@ -385,7 +385,7 @@ static int gen_unique_id(request_rec *r)
     return DECLINED;
 }
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_post_config(unique_id_global_init, NULL, NULL, AP_HOOK_MIDDLE);
     ap_hook_child_init(unique_id_child_init, NULL, NULL, AP_HOOK_MIDDLE);
index 80dd3c1ba54473d8cadc17c557820839fceb8789..44314f1047d8f569dead811e08596bb301b5a787 100644 (file)
@@ -308,10 +308,12 @@ static const command_rec cookie_log_cmds[] = {
                   "name of the tracking cookie"),
     {NULL}
 };
-static void register_hooks(void)
+
+static void register_hooks(apr_pool_t *p)
 {
     ap_hook_fixups(spot_cookie,NULL,NULL,AP_HOOK_MIDDLE);
 }
+
 module AP_MODULE_DECLARE_DATA usertrack_module = {
     STANDARD20_MODULE_STUFF,
     make_cookie_dir,            /* dir config creater */
index af25dc5e19c41a4ea675994f5371967fcf86f21e..1ac42372d1a2dc0cb39927d5e8214018fd51babb 100644 (file)
@@ -744,7 +744,7 @@ static const command_rec proxy_cmds[] =
     {NULL}
 };
 
-static void register_hooks(void)
+static void register_hooks(apr_pool_t *p)
 {
     /* [2] filename-to-URI translation */
     ap_hook_translate_name(proxy_trans, NULL, NULL, AP_HOOK_FIRST);