httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander van Zoest <san...@yahoo-inc.com>
Subject Re: Torching ap_document_root
Date Fri, 08 Mar 2002 04:23:35 GMT
On Thu, Mar 07, 2002 at 02:25:56PM -0800, Greg Stein wrote:
>>>> server/core.c:661
>>>> AP_DECLARE(const char *) ap_document_root(request_rec *r) 
> > > > >>> If we shouldn't use it, why is it still here?
> > So the /* don't use this! */ comment should go?
> I would say rewrite it to be something like:
> Modules shouldn't be worried about the document root. If you need to call
> this function, then you should ask yourself "why". Modules should be more
> concerned with r->uri and r->filename.

There are some cases modules need to have access to the document root
(if not modify it for the duration of the request).

In the case of using a CGI with mod_vhost_alias it would be
nice to be able to have the CGI have access to the virtual document root
via ENV{DOCUMENT_ROOT}. Right now this doesn't seem possible because
mod_vhost_alias does not have access to it and otherwise
ap_add_cgi_vars(r) resets it if we set it via r->subprocess_env in
mod_vhost_alias.

We actually had to hack the core to get this to function appropriately.

Cheers,

--
Sander van Zoest                                          +1 (619) 881-3000
Yahoo!, Inc.                                           sander@yahoo-inc.com
<http://www.yahoo.com/>                       <http://sander.vanzoest.com/>

Mime
View raw message