From: William A. Rowe Jr Date: Tue, 29 Jan 2002 17:46:30 +0000 (+0000) Subject: Many of our platform's apr_dir_read() aren't returning APR_FINFO_TYPE, X-Git-Tag: 2.0.31~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a47e71a1b75e80c931d001bdc4a6fe406a62de1;p=apache Many of our platform's apr_dir_read() aren't returning APR_FINFO_TYPE, so we will take the long way through (and the long way for LNK's as well.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93080 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index a27a8942a3..362d961cad 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -1073,8 +1073,15 @@ static int read_types_multi(negotiation_state *neg) } /* Don't negotiate directories and other unusual files + * Really shouldn't see anything but DIR/LNK/REG here, + * and we aught to discover if the LNK was interesting. + * + * Of course, this only helps platforms that capture the + * the filetype in apr_dir_read(), which most can once + * they are optimized with some magic [it's known to the + * dirent, not associated to the inode, on most FS's.] */ - if (dirent.filetype != APR_REG) + if ((dirent.valid & APR_FINFO_TYPE) && (dirent.filetype == APR_DIR)) continue; /* Ok, something's here. Maybe nothing useful. Remember that