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

From: "Salowey, Joe" <[email-masked]>
Date: Wed, 28 Dec 2005 12:25:05 -0800

This ABNF is for the SSH URI which should not contain a non-empty path.
The deviation from the 3986 path was intended to describe this.  I think
the change is correct, but I could have missed something. The "sftp" URI
uses the path description from 3986. 

> -----Original Message-----
> From: Tom Petch [mailto:[email-masked]] 
> Sent: Wednesday, December 28, 2005 3:37 AM
> To: Salowey, Joe; [email-masked]
> Subject: presence of authority was Re: SFTP URI issues
> 
> Mmmm
> 
> I should have added to my previous reply that I never find 
> RFC3986 easy to
> understand, perhaps because it is not easy to understand:-(
> 
> In RFC3986 is the following
> hier-part     = "//" authority path-abempty
>                  / path-absolute
>                  / path-rootless
>                  / path-empty
> which means
>     authority path-abempty OR
>     path-absolute OR
>     path-rootless OR
>     path-empty
> while the I-D has
> hier-part     =  "//" authority ( path-empty / path-abempty )
> which means
>     authority path-empty OR
>     authority path-abempty
> Is this change intended?
> 
> Tom Petch
> 
> ----- Original Message -----
> From: "Salowey, Joe" <[email-masked]>
> To: <[email-masked]>
> Sent: Wednesday, December 28, 2005 2:40 AM
> Subject: SFTP URI issues
> 
> 
> > Several issues have been raised in the past month over the SFTP URI.
> >
> > Issue #1: On the IETF list several people expressed concern that the
> > scheme name "sftp" might be confused with RFC 913 (Simple 
> FTP) or RFC
> > 2228/4217 (FTP security extensions using TLS).  While I think 913 is
> > historic and unlikely to cause confusion I believe there are
> > implementations of TLS FTP around.  I think there are 
> probably many more
> > implementations of sftp and many people would understand 
> that SFTP is
> > file transfer in SSH, but there is room for confusion.  We 
> could either
> > note the confusion and keep sftp or select some other 
> scheme name such
> > as sshftp and reserve sftp so no other protocol uses it.
> >
> > Issue #2: The current draft states that if you specify a 
> URL that begins
> > without a %2F (URL encoded /) it is relative to the home directory.
> > Several people have suggested that this is awkward and they 
> would rather
> > see
> >
> > A) A URL that beings without a %2f to be an absolute URL, and choose
> > another delimiter such as ~ to indicate a path relative to the home
> > directory.
> >
> > B) Allow / instead of %2F so sftp://[email-masked]/%2ffile becomes
> > sftp://[email-masked]//file
> >
> > I'm not sure B is legal URL encoding, but I think it may 
> work.  A seems
> > like it would work.
> >
> > Any Recommendations?
> >
> > Thanks,
> >
> > Joe
>

---

From: "Tom Petch" <[email-masked]>
Date: Thu, 29 Dec 2005 11:20:03 +0100

----- Original Message -----
From: "Salowey, Joe" <[email-masked]>
To: "Tom Petch" <[email-masked]>; <[email-masked]>
Sent: Wednesday, December 28, 2005 9:25 PM
Subject: RE: presence of authority was Re: SFTP URI issues

> uses the path description from 3986.
Yes, understood.  I am being opaque:-(  I was obliquely referring to the
addition of brackets in the SSH URI which, I believe, changes the meaning from
RFC3986 to mean that the ssh ABNF requires authority always to be present
whereas the URI ABNF only requires authority  to be present for path-abempty,
not for the other variants of path.

So when the ABNF for the SFTP URI says it uses the path definition from RFC3986,
I am unclear what position it takes on authority, always present or not.

There is, I think, a defect in RFC3986 here, in that path-abempty, which is
allowed to start // (two solidus), is only permitted to be used when authority
is present - else the // that precedes authority could be confused with the //
that starts the path-abempty.  Where RFC3986 could be defective is that
authority is defined as, being selective,

 authority     = host
   host          =  reg-name
    reg-name      = *( unreserved / pct-encoded / sub-delims )

which allows authority to be zero characters, in which case the // can get
confused with // :-)

So, you asked if it was ok to start a path with // - my reading of RFC3986 is
that that is what it intends to say but does not quite do so ie it is ok as long
as authority is present and is not zero length. If the last is what the ABNF for
the SFTP URI., or for the SSH URI,  intends to say, then I think this should be
spelt out; but I am not clear what you are intending to say:-(

Tom Petch