[Nfd-dev] How to treat ".." in an NDN URI?

Junxiao Shi shijunxiao at email.arizona.edu
Tue Aug 5 09:27:23 PDT 2014


Hi JeffT

TLV spec cites RFC3986 for URI syntax. The processing of ".." doesn't need
to be mentioned in TLV spec because it's inherited from RFC3986.

RFC3986 <http://tools.ietf.org/html/rfc3986#section-3.3> says:

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 to indicate relative
position within the hierarchical tree of names.

Therefore, if ".." appears within an absolute ndn URI, the entire URI is
invalid and should raise an error.

Yours, Junxiao

On Tue, Aug 5, 2014 at 6:22 AM, Thompson, Jeff <jefft0 at remap.ucla.edu>
wrote:

>  … Right now, both ndn-cxx and ndn-cpp treat ".." as a illegal encoding
> for a component and drop it. So, "/a/b/../c" simply becomes "/a/b/c". But
> ndnx (ndnd-tlv) treat ".." as "up one level" and it becomes "/a/c".
>
>  The question is whether the TLV specification should spell out the
> correct behavior.
>
>  - Jeff T
>
>   From: <Thompson>, Jeff Thompson <jefft0 at remap.ucla.edu>
> Date: Tuesday, August 5, 2014 2:51 AM
> To: nfd-dev <nfd-dev at lists.cs.ucla.edu>
> Subject: How to treat ".." in an NDN URI?
>
>   The TLV specification for the NDN URI scheme says "To unambiguously
> represent name components that would collide with the use of . and .. for
> relative URIs, any component that consists solely of one or more periods is
> encoded using three additional periods.".
> http://named-data.net/doc/ndn-tlv/name.html#ndn-uri-scheme
>
>  If an NDN URI uses the "relative" value of "..", how should the URI be
> decoded.  Specifically, should it be treated as "up one level" like in a
> Unix path?  For example, should the URI "/a/b/../c" be decoded as the name
> "/a/c"?
>
>  (This question comes from an issue on the ndn-js Redmine:
> http://redmine.named-data.net/issues/1818 ).
>
>  Thanks,
> - Jeff T
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20140805/cea3df9f/attachment.html>


More information about the Nfd-dev mailing list