httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rici Lake <>
Subject Re: How can shared modules parse the configuration tree(ap_conftree)???
Date Mon, 27 Jun 2005 16:24:15 GMT

On 27-Jun-05, at 4:47 AM, luca regini wrote:

> I see that the symbols ap_conftree and ap_top_module are not defined 
> in any header but only in the source code. Mod_info uses this symbols.
> I need to do something similar to what mod_info does but in a shared 
> module. Is there a way to do it?? The fact that ap_conftree and 
> ap_top_module are not defined in any header does mean that the API is 
> not stable and probably will change???
> I need to parse the configuration tree because i would like to chance 
> programmatically the value of a cookie in an input filter. However the 
> right value for the cookie is directory - dependent  and per directory 
> configuration is not available in an input filter. So my idea whas to 
> desume the right value parsing the per directory directives i was 
> interested in at module startup.

That's a really bad idea. The fact that it is difficult should be a 
good hint that it is contrary to the design of Apache.

I gather the problem you're running into is that the headers are read 
before the configuration merge is done (for reasons I think are pretty 
obvious). However, cookies are certainly not used until the 
configuration merge is done. So why not do whatever you want to do with 
the cookies in a hook which runs at an appropriate time? There are lots 
to choose from. The input filter could put whatever information it 
wanted to pass to the hook in the module's per-request structure.

View raw message