John,

[...]

> That confusion over the file- or dir-ness is *precisely* why the "add
> trailing slash" hack is done everywhere.  Jerome's argument that
> disagreement is moot because of the "add trailing slash" hack is
> plenty of proof. :-)

The Reference class has no clue about whether "dir" is a file name or a
directory name or a logical resource name. It is only at the connector level
that we can get this metadata. 

The URI RFC is very clear about the way relative URI references should be
resolved, they even specify a generic algorithm:
http://gbiv.com/protocols/uri/rfc/rfc3986.html#absolutize

The Reference class implements this exact algorithm and nothing more. Now,
like the Apache HTTP Server does
(http://httpd.apache.org/docs/2.2/mod/mod_dir.html) we provide an automatic
redirection feature to prevent this unintuitive relative resolution. Note
that this is only unintuitive for URIs mapped to directories or similar
folders.

> If directories always have the trailing slash then there's no
> (non-intentional) ambiguity.  If directories don't always have the
> trailing slash then it's always ambiguous and we end up with the
> POLS-violating behavior that started this disagreement.

In general, this directory redirections shouldn't be triggered if all
representations contain hyperlinks with trailing slashes for directories.
The only case where it can be necessary is when the user manually enters the
URI or when such an URI is bookmarked.

I hope this clarifies my position. Otherwise, could you concretely explain
how you would implement your behavior in the Reference class code.

Best regards,
Jerome

Reply via email to