]> granicus.if.org Git - apache/commitdiff
Many of our platform's apr_dir_read() aren't returning APR_FINFO_TYPE,
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 29 Jan 2002 17:46:30 +0000 (17:46 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 29 Jan 2002 17:46:30 +0000 (17:46 +0000)
  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

index a27a8942a3eed2ee718576fae9348e118f8bc611..362d961cadf092f78b00eed68431070a3547ccd1 100644 (file)
@@ -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