Skip to content

Commit 0f59d4e

Browse files
tjikkunFelipe Zimmerle
authored andcommitted
query MPM after all config is loaded (fixes #786)
1 parent a2eb4c8 commit 0f59d4e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

apache2/mod_security2.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,11 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
690690
change_server_signature(s);
691691
}
692692

693+
/* For connection level hook */
694+
ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
695+
ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);
696+
697+
693698
#if (!(defined(WIN32) || defined(NETWARE)))
694699

695700
/* Internal chroot functionality */
@@ -1672,10 +1677,6 @@ static void register_hooks(apr_pool_t *mp) {
16721677
APR_REGISTER_OPTIONAL_FN(modsec_register_reqbody_processor);
16731678
#endif
16741679

1675-
/* For connection level hook */
1676-
ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
1677-
ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);
1678-
16791680
/* Main hooks */
16801681
ap_hook_pre_config(hook_pre_config, NULL, NULL, APR_HOOK_FIRST);
16811682
ap_hook_post_config(hook_post_config, postconfig_beforeme_list,

0 commit comments

Comments
 (0)