httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Morris <supp...@bettercgi.com>
Subject Re: request_rec.filename alteration
Date Thu, 14 Aug 2008 19:26:31 GMT
   mod_rewrite does URL to filename translation 
in the fixups hook, so it might be a good example
to look at.  My own module uses a subrequest to 
get information from a later phase.
--
Ray B. Morris
support@bettercgi.com

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/

Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/

Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php


On 08/14/2008 01:41:51 PM, Vasiliy Baranov wrote:
> Hi,
> 
> I am trying to write a module that internally translates 
> "/foo/bar/XXX/..." in document paths to "/foo/bar/YYY/...", where 
> "/foo/bar" is a constant and YYY is a function of "/foo/bar" contents
> on 
> disk _and_ authenticated user name. Since the translate_name phase 
> precedes check_user_id (authentication) phase, doing my translation 
> in
> a 
> translate_name hook is out of question. On the other hand, when I am
> in 
> a fixups hook, I am able to alter request_rec.filename as needed, but 
> then someone, most likely core.c line 3631 (httpd 2.2.9), notices 
> that
> 
> the original document (in "/foo/bar/XXX/...") does not exist, and
> issues 
> FILE_NOT_FOUND. What would be the right way to approach this? Doing
> this 
> stuff at the end of authentication phase? Internal redirects? I think
> I 
> can do an internal redirect from a fixups hook, however, it seems 
> somewhat difficult to construct a correct URI for passing to 
> ap_inernal_redirect() there - in my case "/foo/bar/XXX/..." itself 
> may
> 
> be a result of one of many Aliases.
> 
> Thank you,
> Vasiliy
> 



Mime
View raw message