From 0fbee207103c9bf579fbd554da8d392e572837e6 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Tue, 29 Jan 2002 17:46:30 +0000 Subject: [PATCH] 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 --- modules/mappers/mod_negotiation.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 2.50.1