httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Abele <>
Subject Re: ap_process_config_tree called twice -- causes command_rec entries to be called twice -- httpd-2.0.47
Date Sun, 12 Oct 2003 20:46:44 GMT
On 12/10/2003, at 09:33, John Millaway wrote:

> Hi,
> In httpd-2.0.47, command_rec entries are being called twice, via
> ap_process_config_tree. The first call occurs at main.c:581, and the 
> second
> call occurs at main.c:638.  The result is that the callbacks in a 
> module's
> command_rec are called twice, as if the module's directives had 
> appeared
> twice in the httpd.conf file. Is this supposed to happen? -John

Yes, this is the intended behaviour, there's even a comment at 

     /* Note that we preflight the config file once
      * before reading it _again_ in the main loop.
      * This allows things, log files configuration
      * for example, to settle down.

So, post_config hooks are always called twice. You can see a working 
in modules/mappers/mod_rewrite.c or in modules/generators/mod_cgid.c: 
you'll find a flag called "first_time" in the post_config/cgid_init 
handler which takes
care of the number of passes.


View raw message