Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 53680 invoked by uid 500); 28 Jan 2002 21:06:21 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 53664 invoked from network); 28 Jan 2002 21:06:20 -0000 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.0.1 Date: Mon, 28 Jan 2002 14:06:19 -0700 From: "Brad Nicholes" To: ,, Subject: Mod_Negotiation.c is broken... Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_FCA19840.EF8EC57E" X-Spam-Rating: daedalus.apache.org 1.6.2 500/1000/N This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=_FCA19840.EF8EC57E Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 --=_FCA19840.EF8EC57E Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mod_negotiation.c.txt" --- \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! --=_FCA19840.EF8EC57E--