Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 96583 invoked by uid 500); 15 Mar 2002 16:47:20 -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 96569 invoked from network); 15 Mar 2002 16:47:20 -0000 Reply-To: From: "Ryan Bloom" To: , "'Jeff Trawick'" Subject: RE: cvs commit: httpd-2.0/server request.c Date: Fri, 15 Mar 2002 08:47:17 -0800 Organization: Covalent Technologies Message-ID: <000f01c1cc41$112f7d30$c900000a@KOJ> 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, Build 10.0.3416 In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > On 15 Mar 2002 trawick@apache.org wrote: > > > Index: request.c > > =================================================================== > > RCS file: /home/cvs/httpd-2.0/server/request.c,v > > retrieving revision 1.106 > > retrieving revision 1.107 > > diff -u -r1.106 -r1.107 > > --- request.c 13 Mar 2002 20:48:00 -0000 1.106 > > +++ request.c 15 Mar 2002 13:35:42 -0000 1.107 > > @@ -556,6 +556,20 @@ > > */ > > if (!r->finfo.filetype || r->finfo.filetype == APR_LNK) { > > apr_stat(&r->finfo, r->filename, APR_FINFO_MIN, r->pool); > > + > > + /* some OSs will return APR_SUCCESS/APR_REG if we stat > > + * a regular file but we have '/' at the end of the name; > > + * > > + * other OSs will return APR_ENOTDIR for that situation; > > + * > > + * handle it the same everywhere by simulating a failure > > + * if it looks like a directory but really isn't > > + */ > > + if (r->finfo.filetype && > > + r->finfo.filetype != APR_DIR && > > + r->filename[strlen(r->filename) - 1] == '/') { > > + r->finfo.filetype = 0; /* forget what we learned */ > > + } > > } > > It would seem to me that this should go in apr_stat, rather than in > request.c, in order to make the semantics of apr_stat consistent across > platforms. No? Yes, and a test should be added to the test suite to catch this in the future. Ryan