httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Hook sorting wrong during startup
Date Tue, 02 Nov 2010 23:41:57 GMT

while working on ap_expr, I stumbled on the hook sorting being wrong 
while the config is processed. There is an entry in STATUS about it 
and I think I have found the reason. In main.c, there is the following 
calling order:

	ap_read_config(): loads the modules (through EXEC_ON_READ) and
	calls the modules' register_hooks functions. Also explicitly
	registers a hook through init_config_globals/ap_init_vhost_config.

	ap_run_pre_config(): Uses wrong hook order.


	apr_hook_sort_all(): This is too late.

I think apr_hook_sort_all() should be called right after 
ap_read_config() before ap_run_pre_config(). Is it really that simple 
or am I missing something?


PS: It seems this is a known issue since 2001:

View raw message