httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: Torching ap_document_root
Date Thu, 07 Mar 2002 22:25:56 GMT
On Thu, Mar 07, 2002 at 09:23:02PM +0100, Sander Striker wrote:
>...
> > > >>> server/core.c:661
> > > >>>     AP_DECLARE(const char *) ap_document_root(request_rec *r)
/*
> > Don't
> > > use this! */
> > > >>>
> > > >>> If we shouldn't use it, why is it still here?
>...
> > Having looked at the code now.  MO is, yes they are legit.  The code
> > reaches into a core private structure to grab the conf->document_root
> > variable.  I don't want modules doing that themselves.
> 
> 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.


Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message