httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: which module phase to use?
Date Tue, 27 Oct 1998 16:29:09 GMT


On Fri, 23 Oct 1998, Life is hard, and then you die. wrote:

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

I don't understand why.  I suppose I could read the draft though... but
this didn't seem the case at all with the previous digest auth. 

> > > 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?

That's a completely different API, we can't change it now.  I'm not
denying that it could be changed that way, I'm just agreeing it's broken.

But the main point is that it's impossible given apache's oh-too-liberal
usage of regexs for you to figure out the "root", even if char *dir had a
useful meaning.  So you pretty much have to allow the user to tell you the
root...

Dean


Mime
View raw message