httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: [PATCH] httpd.conf-dist
Date Thu, 16 Apr 1998 15:16:07 GMT

In article <> you wrote:
> According to Ralf S. Engelschall:

> [...]
>>  when all three modules are compiled statically into the httpd. Hmmmm...  a
>>  totally unresolvable problem as long as we don't provide module priorities
>>  which could be used inside the module structure of each module and which
>>  force
>>  a special sorting of the internal module list structures.
>>  Or did I miss something and we really don't have this problem?

> No, this *is* a problem.
> Hmmm... we could do something like this:

>  LoadModule mod_proxy
>  LoadModule mod_foo
>  ...
>  ClearModuleList
>  ...
>  AddModule mod_foo
>  AddModule mod_alias
>  AddModule mod_proxy
>  AddModule mod_rewrite
>  ...

> In other words, if there is a least one DSO the install script
> should add ClearModuleList/AddModule directives with the
> correct order of the used modules to httpd.conf...

> It looks ugly and confuses the users, but works (IMHO).

No, sorry, it doesn't work, because AddModule calls ap_add_named_module()
which itself uses the ap_preloaded_modules structure for initialisation. But
the LoadModule command doesn't update it. And because ap_preloaded_modules is
not a dynamically allocated array, mod_so cannot even cannot update it.

As I see the problem the only solution is this:

1. We change the few references to ap_preloaded_modules in http_config.c
   with ap_loaded_modules. This is a useful change independend of our
   problem because the name preloaded is bogus because it is used
   to find all loaded modules.
2. We initialise the dynamically allocated ap_loaded_modules
   list from ap_preloaded_modules to import the information
   from modules.c.

3. We create an ap_remember_loaded_module() and an ap_forget_loaded_module()
   function which can be used by mod_so to insert and remove run-time loaded
   modules to the ap_loaded_modules list.
4. We let the "make install" step create the above configuration snippet

                                       Ralf S. Engelschall

View raw message