IETF-SSH archive

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

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



----- Original Message -----
From: "Salowey, Joe" <jsalowey%cisco.com@localhost>
To: "Tom Petch" <nwnetworks%dial.pipex.com@localhost>; <ietf-ssh%NetBSD.org@localhost>
Sent: Friday, January 06, 2006 2:29 AM
Subject: RE: presence of authority was Re: SFTP URI issues

> Thanks for catching this.  In the SSH URI an authority should always be
> required, but the path should be empty (or perhaps ignored if it is
> there). So I think that the hier-part should be:
>
> hier-part = "//" authority ["/"]
>
> For SFTP I would think that an authority would always be required as
> well but the path could be there or empty
>
> hier-part =  "//" authority path-abempty
>
> Joe
>
Assuming that the SSH URI is sorted, back to the SFTP one.  Yes that ABNF is
fine but I am not sure about the following paragraph in the I-D, on two counts.

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?

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