On 15 Mar 2002 [EMAIL PROTECTED] 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? --Cliff -------------------------------------------------------------- Cliff Woolley [EMAIL PROTECTED] Charlottesville, VA