httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bloom" <...@covalent.net>
Subject RE: Torching ap_document_root, WAS: RE: Code questions
Date Thu, 07 Mar 2002 19:49:24 GMT
> >>> 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?
> >>
> >> Because people are lazy and most people didn't realize that comment
> >> existed.  If nobody is using that function, remove it.
> >
> > Okay, thanks for the heads up.
> 
> modules/ssl/ssl_engine_vars.c:158:            result = (char
> *)ap_document_root(r);
> modules/mappers/mod_rewrite.c:1255:                if ((ccp =
> ap_document_root(r)) != NULL) {
> modules/mappers/mod_rewrite.c:1552:                if ((ccp =
> ap_document_root(r)) != NULL) {
> modules/mappers/mod_rewrite.c:3492:        result =
ap_document_root(r);
> server/util_script.c:278:    apr_table_addn(e, "DOCUMENT_ROOT",
> ap_document_root(r));   /* Apache */
> 
> Ofcourse there are always places where such a function is used...
> Question is now, are they legit?  Should they be changed?

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.

Ryan


Mime
View raw message