Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 5041 invoked from network); 7 Jun 2007 16:00:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jun 2007 16:00:36 -0000 Received: (qmail 53418 invoked by uid 500); 7 Jun 2007 16:00:27 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 53398 invoked by uid 500); 7 Jun 2007 16:00:27 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 53387 invoked by uid 99); 7 Jun 2007 16:00:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2007 09:00:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [204.127.225.91] (HELO alnrmhc11.comcast.net) (204.127.225.91) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2007 09:00:21 -0700 Received: from apt23 (pool-68-160-169-63.bos.east.verizon.net[68.160.169.63]) by comcast.net (alnrmhc11) with SMTP id <20070607160000b1100fkbpce>; Thu, 7 Jun 2007 16:00:00 +0000 From: "Allen Pulsifer" To: Date: Thu, 7 Jun 2007 11:59:59 -0400 Message-ID: <000601c7a91c$e75ba5b0$650aa8c0@apt23> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6822 Importance: Normal Thread-Index: AcepHN9RRDiMYkwcTbmBGw52jUUDFg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2826 X-Virus-Checked: Checked by ClamAV on apache.org Subject: [users@httpd] httpd attempts to open file.html/.htaccess (is this a bug?) Summary: When processing a "GET /.../file.html", Apache httpd briefly treats file.html as a directory and attempts to open "docroot/.../file.html/.htaccess". The os returns ENOTDIR, and then processing of the request continues. There would seem to be no reason for httpd to attempt to open file.html/.htaccess, especially since it has already done a stat on file.html and knows that it is a file, not a directory. Does anyone else see the same behavior? Is this a bug? Details: Configuration: Apache httpd v 2.2.4 running on CentOS-5. Tested with = stock configuration distributed with CentOS-5, as well as a stock installation compiled from the source. Only change to http.conf is: "AllowOverride None" changed to "AllowOverride All" DocumentRoot is "/var/www/html", and I created an html file at /var/www/html/dir/subdir/file.html Command is "curl -i http://localhost/dir/subdir/file.html" Result of "strace -f -e trace=3Dfile /usr/sbin/httpd": [pid 24550] stat64("/var/www/html/dir/subdir/file.html", {st_mode=3DS_IFREG|0644, st_size=3D48, ...}) =3D 0 [pid 24550] open("/var/www/html/.htaccess", O_RDONLY|O_LARGEFILE) =3D -1 ENOENT (No such file or directory) [pid 24550] open("/var/www/html/dir/.htaccess", O_RDONLY|O_LARGEFILE) = =3D -1 ENOENT (No such file or directory) [pid 24550] open("/var/www/html/dir/subdir/.htaccess", = O_RDONLY|O_LARGEFILE) =3D -1 ENOENT (No such file or directory) [pid 24550] open("/var/www/html/dir/subdir/file.html/.htaccess", O_RDONLY|O_LARGEFILE) =3D -1 ENOTDIR (Not a directory) [pid 24550] open("/var/www/html/dir/subdir/file.html", = O_RDONLY|O_LARGEFILE) =3D 18 Note the open("/var/www/html/dir/subdir/file.html/.htaccess"), which returned ENOENT. It is believed that this bug is somewhere in ap_directory_walk() in server\request.c --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org