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, 20 Oct 1998 08:37:22 GMT
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?

> of the request (assuming the request is syntactically reasonable, of
> course).  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?

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

Dean

> Currently I'm prefix-matching the path received in the
> dir-config-creater with the request-URI and if they match (apart
> from just a leading "/") I'm assuming it came from a <Location>
> directive.
> 
> 
>   Cheers,
> 
>   Ronald
> 


Mime
View raw message