Subject: Guidelines on usage of // in new URI schemes

From: Eran Hammer-Lahav <[email-masked]>
Date: Wed, 19 Aug 2009 22:48:22 -0700

I am in the process of proposing a new URI scheme to identify user accounts [1]. This is part of the WebFinger protocol [2] effort.

This email is *not* an invitation to debate the merits of this new URI scheme (just yet). I am sure we will have many lively discussions about it shortly but I would like to present a proposal before we have a public debate about it here.

The new scheme has two components, a local identifier (username, screenname, handle, etc.) and a host (which can resolve and authenticate the local identifier). When looking at the URI specification (RFC 3986) and at the new URI guidelines (BCP 35), it is hard to figure out what is an appropriate use of // in new schemes.

In this case, we have a requirement to keep the URI (the part after the scheme:) looking as close to an RFC-822 identifier (username@host) and that means two options:

acct:username@host
acct://username@host

The 'username@host' part seems to fit perfectly into the URI authority as defined by RFC 3986. However, since the URI does not have a path, it does not really contain a hierarchical structure (just the top level host).

The benefit of using // in this case is that existing URI parsing code can be used unmodified to process the new URI. It is a simple profile which only allows the userinfo and host subcomponents of the authority component, and no other URI components. Since the new scheme will be often used with URI templates and other facilities often used with http: URIs, it is very convenient to have a common structure (even if it is only a subset). I don't see any down side to using // other than defying expectations established by the mailto: URI scheme.

The benefit of not using // is that it makes the URI follow the well establish pattern in mailto: and save two bytes. The down side is that it requires spelling out how to break the URI path into sub components specific to this scheme.

So far the feedback I received is focus on style which is perfectly valid, but I want to make sure I am not missing anything. My preference is to reuse as much as possible and therefore include the //.

Any suggestions?

EHL

[1] http://www.hueniverse.com/hueniverse/2009/08/making-the-case-for-a-new-acct-uri-scheme-for-accounts.html
[2] http://code.google.com/p/webfinger

---

From: Timur Shemsedinov <[email-masked]>
Date: Thu, 20 Aug 2009 09:18:22 +0300

*Hello*

See RFC 2718 - Guidelines for new URL Schemes
http://www.ietf.org/rfc/rfc2718.txt

2.1.2 Improper use of "//" following "<scheme>:"

Contrary to some examples set in past years, the use of double
slashes as the first component of the <scheme-specific-part> of a URL
is not simply an artistic indicator that what follows is a URL:
Double slashes are used ONLY when the syntax of the URL's <scheme-
specific-part> contains a hierarchical structure as described in RFC
2396. In URLs from such schemes, the use of double slashes indicates
that what follows is the top hierarchical element for a naming
authority. (See section 3 of RFC 2396 for more details.) URL
schemes which do not contain a conformant hierarchical structure in
their <scheme-specific-part> should not use double slashes following
the "<scheme>:" string.

On Thu, Aug 20, 2009 at 8:48 AM, Eran Hammer-Lahav <[email-masked]>wrote:

> I am in the process of proposing a new URI scheme to identify user accounts
> [1]. This is part of the WebFinger protocol [2] effort.
>
> This email is *not* an invitation to debate the merits of this new URI
> scheme (just yet). I am sure we will have many lively discussions about it
> shortly but I would like to present a proposal before we have a public
> debate about it here.
>
> The new scheme has two components, a local identifier (username,
> screenname, handle, etc.) and a host (which can resolve and authenticate the
> local identifier). When looking at the URI specification (RFC 3986) and at
> the new URI guidelines (BCP 35), it is hard to figure out what is an
> appropriate use of // in new schemes.
>
> In this case, we have a requirement to keep the URI (the part after the
> scheme:) looking as close to an RFC-822 identifier (username@host) and
> that means two options:
>
> acct:username@host
> acct://username@host
>
> The 'username@host' part seems to fit perfectly into the URI authority as
> defined by RFC 3986. However, since the URI does not have a path, it does
> not really contain a hierarchical structure (just the top level host).
>
> The benefit of using // in this case is that existing URI parsing code can
> be used unmodified to process the new URI. It is a simple profile which only
> allows the userinfo and host subcomponents of the authority component, and
> no other URI components. Since the new scheme will be often used with URI
> templates and other facilities often used with http: URIs, it is very
> convenient to have a common structure (even if it is only a subset). I don't
> see any down side to using // other than defying expectations established by
> the mailto: URI scheme.
>
> The benefit of not using // is that it makes the URI follow the well
> establish pattern in mailto: and save two bytes. The down side is that it
> requires spelling out how to break the URI path into sub components specific
> to this scheme.
>
> So far the feedback I received is focus on style which is perfectly valid,
> but I want to make sure I am not missing anything. My preference is to reuse
> as much as possible and therefore include the //.
>
> Any suggestions?
>
> EHL
>
> [1]
> http://www.hueniverse.com/hueniverse/2009/08/making-the-case-for-a-new-acct-uri-scheme-for-accounts.html
> _______________________________________________
> Apps-Discuss mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/apps-discuss
>

---

From: Bill McQuillan <[email-masked]>
Date: Wed, 19 Aug 2009 23:20:17 -0700

On Wed, 2009-08-19, Eran Hammer-Lahav wrote:
> I am in the process of proposing a new URI scheme to identify user
> accounts [1]. This is part of the WebFinger protocol [2] effort.

> scheme (just yet). I am sure we will have many lively discussions about
> it shortly but I would like to present a proposal before we have a public
> debate about it here.

> screenname, handle, etc.) and a host (which can resolve and authenticate
> the local identifier). When looking at the URI specification (RFC 3986)
> and at the new URI guidelines (BCP 35), it is hard to figure out what is
> an appropriate use of // in new schemes.

> In this case, we have a requirement to keep the URI (the part after
> the scheme:) looking as close to an RFC-822 identifier (username@host)
> and that means two options:

> The 'username@host' part seems to fit perfectly into the URI authority
> as defined by RFC 3986. However, since the URI does not have a path, it
> does not really contain a hierarchical structure (just the top level
> host).

> The benefit of using // in this case is that existing URI parsing code
> can be used unmodified to process the new URI. It is a simple profile
> which only allows the userinfo and host subcomponents of the authority
> component, and no other URI components. Since the new scheme will be
> often used with URI templates and other facilities often used with http:
> URIs, it is very convenient to have a common structure (even if it is
> only a subset). I don't see any down side to using // other than defying
> expectations established by the mailto: URI scheme.

> requires spelling out how to break the URI path into sub components
> specific to this scheme.

> So far the feedback I received is focus on style which is perfectly
> valid, but I want to make sure I am not missing anything. My preference
> is to reuse as much as possible and therefore include the //.

> Any suggestions?

It seems to me that the purpose of the // in a net-path is to allow the
case where the // is NOT there (e.g., a relative path). Assuming that you
were to adopt the //, what would be the meaning of such a URI without the
// ?

If there is no reasonable distinction, I think the // would be superfluous.

-- 
Bill McQuillan <[email-masked]>

---

From: Timur Shemsedinov <[email-masked]>
Date: Thu, 20 Aug 2009 14:49:35 +0300

If acct scheme allows "path" you should use //, for example:
acct://username@host/hierarchical/path/to/specific/resource or like
ftp://user@host/folder
otherwise (if acct only purpose is to identify user like this
acct:username@host) you can't use //
For example: tel:, mailto:, telnet: etc... there are no path, so // is not
acceptable,

BCP 35: *URL schemes which do not contain a conformant hierarchical
structure in their <scheme-specific-part> should not use double slashes*

On Thu, Aug 20, 2009 at 9:30 AM, Eran Hammer-Lahav <[email-masked]>wrote:

>  Yeah, that’s BCP 35 and it doesn’t answer my question.
>
>
>
> EHL
>
>
>
> *From:* Timur Shemsedinov [mailto:[email-masked]]
> *Sent:* Wednesday, August 19, 2009 11:18 PM
> *To:* Eran Hammer-Lahav
> *Cc:* [email-masked]; URI
> *Subject:* Re: Guidelines on usage of // in new URI schemes
>
>
>
> *Hello*
>

---

From: Sam Johnston <[email-masked]>
Date: Thu, 20 Aug 2009 14:00:46 +0200

> structure in their <scheme-specific-part> should not use double slashes*

Agreed.

Sam

---

From: Timur Shemsedinov <[email-masked]>
Date: Thu, 20 Aug 2009 10:43:38 -0400

*Hello*