httpd-dev mailing list archives

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

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.

	ap_process_config_tree()
	ap_fixup_virtual_hosts()
	ap_fini_vhost_config()

	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?

Cheers,
Stefan

PS: It seems this is a known issue since 2001:
http://svn.apache.org/viewvc?view=revision&revision=88887

Mime
View raw message