Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 95934 invoked by uid 500); 7 Mar 2002 20:19:07 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 95920 invoked from network); 7 Mar 2002 20:19:06 -0000 From: "Sander Striker" To: Subject: RE: Torching ap_document_root, WAS: RE: Code questions Date: Thu, 7 Mar 2002 21:23:02 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: <00b101c1c611$2e94c550$7f00000a@KOJ> Importance: Normal X-Rcpt-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > From: Ryan Bloom [mailto:rbb@covalent.net] > Sent: 07 March 2002 20:49 > > >>> 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. So the /* don't use this! */ comment should go? > Ryan Sander