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

Junxiao Shi shijunxiao at email.arizona.edu
Sun Aug 10 21:35:20 PDT 2014


Dear folks

I looked at RFC3986 again.

Section 6.2.2.3.  Path Segment Normalization states:

The complete path segments "." and ".." are intended only for use within
relative references (Section 4.1) and are removed as part of the reference
resolution process (Section 5.2).  However, some deployed implementations
incorrectly assume that reference resolution is not necessary when the
reference is already a URI and thus fail to remove dot-segments when they
occur in non-relative paths.

This implies that "." and ".." are both permitted in absolute URIs.
The exact rules are defines in Section 5.2.

Therefore, these ndn: URIs are all equivalent:

   - /A/B/C
   - ndn:/A/B/C
   - ndn:///A/B/C
   - ndn://authority/A/B/C
   - /A/./B/C
   - /A/D/../B/C
   - /../A/B/C
   - /./A/B/C


Yours, Junxiao

On Wed, Aug 6, 2014 at 9:49 AM, Thompson, Jeff <jefft0 at remap.ucla.edu>
wrote:

>  Hi Junxiao,
>
>  Using your example of the URL for RFC3986, the following link works:
> http://tools.ietf.org/html/rfcblahblahblah/../rfc3986#section-3.3
>
>  So ".." is illegal in a URI, but legal in a URL?  Maybe the support for
> .. In a URL is non-standard?
>
>  - Jeff T
>
>
>   From: Junxiao Shi <shijunxiao at email.arizona.edu>
> Date: Tuesday, August 5, 2014 9:27 AM
> To: Jeff Thompson <jefft0 at remap.ucla.edu>
> Cc: nfd-dev <nfd-dev at lists.cs.ucla.edu>
> Subject: Re: [Nfd-dev] How to treat ".." in an NDN URI?
>
>   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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20140810/e88c404d/attachment.html>


More information about the Nfd-dev mailing list