<div dir="ltr">Hi JeffT<div><br></div><div>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.</div><div><br></div><div>

<a href="http://tools.ietf.org/html/rfc3986#section-3.3" target="_blank">RFC3986</a> says:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">

<div>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.</div>



</blockquote><div>Therefore, if ".." appears within an absolute ndn URI, the entire URI is invalid and should raise an error.</div><div><br></div><div><div class="gmail_extra">Yours, Junxiao<br><br><div class="gmail_quote">



On Tue, Aug 5, 2014 at 6:22 AM, Thompson, Jeff <span dir="ltr"><<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">







<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>… 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".  </div>




<div><br>
</div>
<div>The question is whether the TLV specification should spell out the correct behavior.</div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<span>
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span><Thompson>, Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Date: </span>Tuesday, August 5, 2014 2:51 AM<br>
<span style="font-weight:bold">To: </span>nfd-dev <<a href="mailto:nfd-dev@lists.cs.ucla.edu" target="_blank">nfd-dev@lists.cs.ucla.edu</a>><br>
<span style="font-weight:bold">Subject: </span>How to treat ".." in an NDN URI?<br>
</div><div><div>
<div><br>
</div>
<div>
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>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.".</div>




<div><a href="http://named-data.net/doc/ndn-tlv/name.html#ndn-uri-scheme" target="_blank">http://named-data.net/doc/ndn-tlv/name.html#ndn-uri-scheme</a></div>
<div><br>
</div>
<div>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"?</div>




<div><br>
</div>
<div>(This question comes from an issue on the ndn-js Redmine: <a href="http://redmine.named-data.net/issues/1818" target="_blank">http://redmine.named-data.net/issues/1818</a> ).</div>
<div><br>
</div>
<div>Thanks,</div>
<div>- Jeff T</div>
</div>
</div>
</div></div></span>
</div>

</blockquote></div><br></div></div></div>