Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 87694 invoked from network); 26 Sep 2005 16:52:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Sep 2005 16:52:07 -0000 Received: (qmail 52549 invoked by uid 500); 26 Sep 2005 16:52:06 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 52514 invoked by uid 500); 26 Sep 2005 16:52:05 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 52501 invoked by uid 99); 26 Sep 2005 16:52:05 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 26 Sep 2005 09:52:05 -0700 Received: (qmail 87505 invoked by uid 65534); 26 Sep 2005 16:51:44 -0000 Message-ID: <20050926165144.87504.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r291672 - /httpd/httpd/trunk/modules/mappers/mod_dir.c Date: Mon, 26 Sep 2005 16:51:44 -0000 To: cvs@httpd.apache.org From: colm@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: colm Date: Mon Sep 26 09:51:41 2005 New Revision: 291672 URL: http://svn.apache.org/viewcvs?rev=291672&view=rev Log: Explain why we have the regular file typecheck. No functional changes. Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/mappers/mod_dir.c?rev=291672&r1=291671&r2=291672&view=diff ============================================================================== --- httpd/httpd/trunk/modules/mappers/mod_dir.c (original) +++ httpd/httpd/trunk/modules/mappers/mod_dir.c Mon Sep 26 09:51:41 2005 @@ -178,8 +178,17 @@ rr = ap_sub_req_lookup_uri(name_ptr, r, NULL); - /* XXX: (filetype == APR_REG) - we can't use a non-file index??? */ - if ( rr->status == HTTP_OK + /* The sub request lookup is very liberal, and the core map_to_storage + * handler will almost always result in HTTP_OK as /foo/index.html + * may be /foo with PATH_INFO="/index.html", or even / with + * PATH_INFO="/foo/index.html". To get around this we insist that the + * the index be a regular filetype. + * + * Another reason is that the core handler also makes the assumption + * that if r->finfo is still NULL by the time it gets called, the + * file does not exist. + */ + if (rr->status == HTTP_OK && ( (rr->handler && !strcmp(rr->handler, "proxy-server")) || rr->finfo.filetype == APR_REG)) { ap_internal_fast_redirect(rr, r);