diff options
Diffstat (limited to 'server/main.c')
| -rw-r--r-- | server/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/main.c b/server/main.c index 04ed6c78..224a10ef 100644 --- a/server/main.c +++ b/server/main.c @@ -633,6 +633,7 @@ int main(int argc, const char * const argv[]) if (!server_conf) { destroy_and_exit_process(process, 1); } + /* sort hooks here to make sure pre_config hooks are sorted properly */ apr_hook_sort_all(); if (ap_run_pre_config(pconf, plog, ptemp) != OK) { @@ -646,6 +647,12 @@ int main(int argc, const char * const argv[]) if (rv == OK) { ap_fixup_virtual_hosts(pconf, server_conf); ap_fini_vhost_config(pconf, server_conf); + /* + * Sort hooks again because ap_process_config_tree may have added + * modules and hence hooks. This happens with mod_perl and modules + * written in perl. + */ + apr_hook_sort_all(); if (configtestonly) { ap_run_test_config(pconf, server_conf); @@ -704,6 +711,7 @@ int main(int argc, const char * const argv[]) if (!server_conf) { destroy_and_exit_process(process, 1); } + /* sort hooks here to make sure pre_config hooks are sorted properly */ apr_hook_sort_all(); if (ap_run_pre_config(pconf, plog, ptemp) != OK) { @@ -718,6 +726,12 @@ int main(int argc, const char * const argv[]) } ap_fixup_virtual_hosts(pconf, server_conf); ap_fini_vhost_config(pconf, server_conf); + /* + * Sort hooks again because ap_process_config_tree may have added + * modules and hence hooks. This happens with mod_perl and modules + * written in perl. + */ + apr_hook_sort_all(); apr_pool_clear(plog); if (ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) { ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, |
