httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Life is hard, and then you die." <>
Subject Re: which module phase to use?
Date Fri, 23 Oct 1998 05:55:34 GMT

On Tue, 20 Oct 1998, Dean Gaudet wrote:

> On Fri, 16 Oct 1998, Life is hard, and then you die. wrote:
> > In the process of rewriting mod_digest to comply with the lastest
> > digest draft I ran into the problem of needing to be able read the
> > request headers for *every* request, no matter what the final outcome
> Even requests not protected by digest auth?

Yup. Even if the URI does not exist, even if it's protected differently,
even if...

> > Looking through the code the best I could find was to hook
> > into the filename-translation phase and make sure the module precedes
> > any other module which might abort the request. Is there any better
> > way? What about the fixup phase - is that always called (not matter
> > what the return code)?
> Why doesn't post_read_request work?

Yeah, works fine, just missed it before. Thanks.

> > A second question: what is the best way to find out what kind of
> > directive (<Location>, <Directory> or <Files>) is protecting a
> > resource (requiring authentication)? I can get a path in the
> > dir-config-creater, but I don't know whether that is a URI or a
> > filename.  I need to know because I need to send back a domain
> > attribute with Authorization-Info header which contains a URI
> > pointing to the root of a protected tree (if I can figure one out -
> > things like mod_rewrite of course can make that impossible).
> Given that it's impossible in general, why not require the user to
> supply it in your config directive?
> There's no way to know if you're merging a location/directory/files
> section, or a .htaccess file... you could argue quite easily that the
> dir_create "char *dir" parameter is totally broken given the existance
> of these other types of sections.

But since the "merge" is just an override (default merge behaviour)
wouldn't an extra parameter to the dir_create handler work? i.e.
something like:

void *dir_config_creater(pool *p, char *dir, int type)

with "type" being one of three defined constants, LOCATION, FILES, or
DIRECTORY. Even if you did your own merge then you'd have the necessary
info to know what the heck you're trying to merge and to tell whether
you can make sense of it. Or am I missing something?



View raw message