Date: Sat, 23 May 2009 18:32:48 +0300 From: Vlad GALU <dudu@dudu.ro> To: Bruce Evans <brde@optusnet.com.au> Cc: freebsd-fs@freebsd.org, Mircea Danila-Dumitrescu <venatir@xss.ro> Subject: Re: *stat()-ing symlinks with trailing slashes Message-ID: <ad79ad6b0905230832r7de242ao1ad3a9c0c773396a@mail.gmail.com> In-Reply-To: <20090523191136.E763@delplex.bde.org> References: <ad79ad6b0905220941i138fd5cch61b0ab46e89c43fd@mail.gmail.com> <ad79ad6b0905221258n2301050ewe31116104ad700cd@mail.gmail.com> <20090523191136.E763@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 23, 2009 at 1:34 PM, Bruce Evans <brde@optusnet.com.au> 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!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ad79ad6b0905230832r7de242ao1ad3a9c0c773396a>