Re: remove dot segment

At 23:57 18/11/04 -0800, Roy T. Fielding wrote:

>On Nov 18, 2004, at 9:17 AM, Martin Balaz wrote:
>>I would like to discuss one old problem of the remove_dot_segments function,
>>which is not yet solved as I know.
>>Following URIs are valid with the respect to the latest rfc2396bis:
>No, they are allowed by the syntax.  They are not valid.
>    The path segments "." and "..", also known as dot-segments, are
>    defined for relative reference within the path name hierarchy.  They
>    are intended for use at the beginning of a relative-path reference
>    (Section 4.2) for indicating relative position within the
>    hierarchical tree of names.  This is similar to their role within
>    some operating systems' file directory structure to indicate the
>    current directory and parent directory, respectively.  However,
>    unlike a file system, these dot-segments are only interpreted within
>    the URI path hierarchy and are removed as part of the resolution
>    process (Section 5.2).
>It doesn't matter what is the result of processing
>because those are not valid file URIs.

Roy, I'm not sure that helps with these test cases:

testRelative84 = testRelJoin "testRelative84"
                     "f:/a" ".//g"

testRelative89 = testRelJoin "testRelative89"
                     "f:/a/" "..//g"

or did I miss something else?


Graham Klyne
For email:

Received on Friday, 19 November 2004 11:20:01 UTC