httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: Setting both Server and Directory Config Structs from the same config function
Date Fri, 17 Nov 2006 10:36:32 GMT
On Thu, 16 Nov 2006 18:31:24 -0700
"David Wortham" <> wrote:

> Nick,
> I was almost done copy-pasting and simplifying my code when I re-read
> your response.
> I had previously tried an if/else in the directive handling function
> (as in: if (dir->path is set) { set dir_struct; } else { set
> svr_struct; } ). For some reason, I didn't think that the call had to
> be mutually exclusive (only DIR or SVR, not both).

I don't think it does.  But it's hard to see how/why you could
*usefully* set both in a single command handler.

> I read through the 2.0 code (thanks !),
> which has different comments than 1.3.  In there, the path is what
> determines if the directive-handling function was called via a DIR or
> a SVR context (and I now realize they are mutually exclusive).  A
> simple test to see if the cmd_parms->module_config is not NULL
> apparently is not sufficient.

There's an ap_check_command_context (or something like that - 
this is from memory) that might help.

Nick Kew

Application Development with Apache - the Apache Modules Book

View raw message