httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Is this a bug, or am I being stupid?
Date Mon, 16 Oct 1995 15:14:22 GMT
> 
>   (and displays seemingly correct behaviour). Is this a bug, or did I miss
>   something?
> 
> I think you were missing something, though I'm not sure what --- what this
> patch does is to pass the server config structure to the command handler
> if no per-directory config structure exists.  The behavior which a number
> of modules expect is that if no per-directory config structure exists, they
> get passed a NULL pointer.
> 
> The correct way to get at the per-server config structure is through
> cmd_parms->server.  I deliberately made this a bit more awkward than for
> the per-directory case as a way of subtly encouraging people to make thing
> configurable per directory where possible.  We may want to revisit the
> decision, but I'm pretty sure this isn't the right way to do it --- creating
> a situation where the same argument to a command handler can be a per-dir
> config structure in some cases, and a per-server config structure in other
> cases, while leaving the module itself no way to tell the difference,
> doesn't seem right.

I agree with you. My problem is that I'm trying to use set_string_slot() to,
well, set a string slot. But it must be per-server. So, really, I need a
set_server_string_slot(). But, you can't write that (I don't think) because
the module is unknown (at this point), so you can't find the right structure.
Sigh. While we're on the subject, a set_[server_]int_slot() would be nice,
too.

BTW, set_string_slot() unnecessarily pstrdups() the string.

> rst

Cheers,

Ben.

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant        Fax:   +44 (181) 994 6472
and Technical Director      Email: ben@algroup.co.uk
A.L. Digital Ltd,
London, England.

Mime
View raw message