From: Jamie Lokier <jamie@shareable.org>
To: Christian Mayrhuber <christian.mayrhuber@gmx.net>
Cc: reiserfs-list@namesys.com, David Dabbs <david@dabbs.net>,
linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] Pathname Semantics with //
Date: Fri, 10 Sep 2004 00:03:33 +0100 [thread overview]
Message-ID: <20040909230333.GB8464@mail.shareable.org> (raw)
In-Reply-To: <200409091933.06100.christian.mayrhuber@gmx.net>
Christian Mayrhuber wrote:
> //http://somehost:port/foo/bla
While we're here, I'll point out that http://somehost/foo/bla and
http://somehost/foo/bla/ are valid, distinct URLs.
If http://somehost/foo/bla/ exists, many HTTP servers will return it
as the target of a redirect for http://somehost/foo/bla. The reason
for this is that it's important for any relative URLs in a document to
be resolved relative to the correct base URL of the document.
If we do actually allow file-and-directory objects, it makes sense for
the path _with_ slash on the end (//http://somehost/foo/bla/) to be
accessible as both a file and a directory, mapping to that HTTP
resource, and resources below it in the path hierarchy.
Then relative paths in the resource resolve sensibly in programs which
think they're in the local filesystem.
It also makes sense for the path _without_ slash to be recognisable to
programs as needing the slash. That could be done by making the path
without slash by a symlink to one with (symlinks are a natural
representation of redirects). But that seems like a gross violation
of POSIX semantics: we can't really return different objects depending
on the trailing slash.
So instead, it makes sense for either form of the path to be a
file-and-directory object whose type is S_IFDIR, and specifically not
S_IFREG -- but only in the cases where the HTTP transaction to the URL
without a trailing slash returns a redirect to the same URL with a
slash appended. When the HTTP transaction to the URL without a
trailing slash returns a resource, then it's type in the filesystem
should be S_IFREG, but still a file-as-directory object.
Food for thought.
-- Jamie
next prev parent reply other threads:[~2004-09-09 23:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-09 10:41 [RFC] Pathname Semantics with // David Dabbs
2004-09-08 16:13 ` Hans Reiser
2004-09-09 16:36 ` Peter Foldiak
2004-09-09 19:21 ` David Dabbs
2004-09-10 0:49 ` Hans Reiser
2004-09-10 3:06 ` David Dabbs
2004-09-10 5:40 ` Hans Reiser
2004-09-09 21:51 ` David Dabbs
2004-09-09 6:10 ` Hans Reiser
2004-09-09 17:33 ` Christian Mayrhuber
2004-09-09 20:17 ` David Dabbs
2004-09-09 20:41 ` Andreas Dilger
2004-09-10 9:11 ` Markus Törnqvist
2004-09-10 10:37 ` Christian Mayrhuber
2004-09-09 23:03 ` Jamie Lokier [this message]
2004-09-10 1:37 ` David Dabbs
2004-09-10 9:53 ` [SPAM] " Jamie Lokier
2004-09-10 17:11 ` David Dabbs
2004-09-10 11:47 ` Christian Mayrhuber
2004-09-10 11:06 ` Christian Mayrhuber
-- strict thread matches above, loose matches on Subject: below --
2004-09-10 17:49 David Dabbs
2004-09-09 18:03 ` Hans Reiser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040909230333.GB8464@mail.shareable.org \
--to=jamie@shareable.org \
--cc=christian.mayrhuber@gmx.net \
--cc=david@dabbs.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=reiserfs-list@namesys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).