I'm not sure when the change was entered so I don't know the exact
reason for it but mod_negoteation is no longer able to negotiate
language files.  The reason is because a check for "dirent.filetype !=
APR_REG" was added but APR_FINFO_TYPE was not requested in the call to
apr_dir_read().  The only information that was asked for in the call to
apr_dir_read() is APR_FINFO_DIRENT which appears to be equivalent to
APR_FINFO_NAME.  Since APR_FINFO_TYPE was not asked for, the check for
"dirent.filetype != APR_REG" will always be true and no files will be
negotiated.  If APR_FINFO_TYPE is added, then stat() will be called for
every file which will be extremely expensive.  Can the check for
"dirent.filetype != APR_REG" be removed? 

thanks,
Brad
--- \tempapache\httpd-2.0\modules\mappers\mod_negotiation.c     Mon Jan 28 
13:10:11 2002
+++ mod_negotiation.c   Mon Jan 28 14:02:11 2002
@@ -1074,8 +1074,12 @@
 
         /* Don't negotiate directories and other unusual files
          */
-        if (dirent.filetype != APR_REG)
+        /*  XXX This information was never asked for in the call to 
+             apr_dir_read() therefore all files will fail and nothing
+             will be negotiated */
+/*        if (dirent.filetype != APR_REG)
             continue;
+*/
 
         /* Ok, something's here.  Maybe nothing useful.  Remember that
          * we tried, if we completely fail, so we can reject the request!

Reply via email to