IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

RE: SFTP was Re: presence of authority was Re: SFTP URI issues



 
<snip> 
> 
> a) The Generic Syntax for URI [RFC3986] says
>   "If a URI contains an authority component, then the path component
>    must either be empty or begin with a slash ("/") character.  "
> which is what <path-abempty> achieves.  The I-D goes on to say that
> if a path starts with a / then it is relative to the root of 
> the file system,
> otherwise it is relative to the user's home or default 
> directory.  But the
> Generic Syntax requires the path to start with a / or be 
> empty, so you can never
> have a path relative to the user's home directory except for 
> an empty one:-)
> 
> b) In this section, the I-D says that / is a reserved 
> character - I agree - and
> that it must be encoded - disagree.   In URI, reserved is not 
> used in the way I
> would like to see it used -  it means that sometimes the 
> character must be
> encoded, other times not:-{
>   " If data for a URI component would conflict with a reserved
>      character's purpose as a delimiter, then the conflicting 
> data must be
>      percent-encoded before the URI is formed."
> The initial / of <path-abempty> is a delimiter between 
> authority and path and so
> must be just that, / not %2F.
> So are you allowing
>    sftp://example.com/%2Fetc/protocols
> for absolute paths as opposed to
>    sftp://example.com/mylocalfile.txt
> for relative ones?
>

[Joe] Yes, that was the intent of the draft.  However this doesn't seem
to be the best way to handle this.  I think most people would rather not
have to enter in %2F into a URL to specify an absolute path.  Using "//"
to represent the absolute path is better and you confirm that it would
work fine.  

Is this behavior consistent with other URLs? In RFC3986 these are
referred to as absolute paths so perhaps it would be better to have
paths default to root and define a special delimiter to indicate home
directory at the beginning of the path.  This would seem to make it more
likely that an HTTP URL path would also work as an SFTP URL path, but
perhaps the two cases are too different for this actually to work.




 
> I am unclear.
> 
> (The end of <path-abempty> will be signalled by the end of 
> the URI or the
> characters ? or # and so / is not a delimiter for that 
> purpose and can appear as
> such as many times as it likes unencoded within such a path).
> 
> Tom Petch
> 
> <snip>
> 



Home | Main Index | Thread Index | Old Index