From owner-freebsd-fs@FreeBSD.ORG Sat May 23 15:33:10 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06C291065679 for ; Sat, 23 May 2009 15:33:10 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from mail-bw0-f165.google.com (mail-bw0-f165.google.com [209.85.218.165]) by mx1.freebsd.org (Postfix) with ESMTP id 925248FC17 for ; Sat, 23 May 2009 15:33:09 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by bwz9 with SMTP id 9so2278505bwz.43 for ; Sat, 23 May 2009 08:33:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.105.75 with SMTP id s11mr2729238fao.4.1243092788122; Sat, 23 May 2009 08:33:08 -0700 (PDT) In-Reply-To: <20090523191136.E763@delplex.bde.org> References: <20090523191136.E763@delplex.bde.org> From: Vlad GALU Date: Sat, 23 May 2009 18:32:48 +0300 Message-ID: To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org, Mircea Danila-Dumitrescu Subject: Re: *stat()-ing symlinks with trailing slashes X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2009 15:33:10 -0000 On Sat, May 23, 2009 at 1:34 PM, Bruce Evans wrote: [...] > ENOTDIR is correct for following a symlink to non-directory (with a > trailing slash in the pathname). Eh, yes, unfortunately it doesn't work like that yet :) > > Why does GET give trailing slashes for non-directories? =A0Trailing > slashes are most useful interactively for getting symlinks followed > and for avoiding getting file contents when you "know" that the file > is a directory (and that the OS handles trailing slashes reasonably). > Applications shouldn't need this hack since they can use lstat() to > get more details, and it is still unportable. What Mircea had was a symlink, "script.php", pointing to "/some/other/path/for/script.php" in his wwwroot. Then he sent a GET request on $httphost/script.php/", to which lighttpd responded with the full contents of script.php. Unfortunately I haven't looked at lighty's sources yet to see how they manage the requests. Thanks, Bruce, for your input, sharp as always!