[jdev] Authority component in xmpp: URIs

Peter Saint-Andre stpeter at stpeter.im
Wed Feb 25 17:26:07 CST 2009


Massimiliano Mirra wrote:
> Are these two URIs equivalent?
> 
>   xmpp:foo at bar.org
>   xmpp:///foo@bar.org (notice triple slash)

No, they are not. In fact, the second one is not even a valid XMPP URI
because an XMPP URI with an authority component is constructed as follows:

xmpp://authcomp/node@host

Where "authcomp" cannot be empty, because it too is of the form
node at host. However, I think the ABNF is wrong in RFC 5122:

nodeid    = *( unreserved / pct-encoded / nodeallow )

That should be:

nodeid    = 1*( unreserved / pct-encoded / nodeallow )

That is, a nodeid MUST NOT be of zero length, so that's a spec bug in
RFC 5122. See also:

http://xmpp.org/internet-drafts/draft-saintandre-rfc3920bis-08.html#addressing-overview

For the "host" rule see here (it also cannot be of zero length):

http://tools.ietf.org/html/rfc3986#section-3.2.2

If I had my way, we would remove the authority component from XMPP URIs
entirely, because they are extremely confusing and unnecessary. Perhaps
we can do that with rfc5122bis. :)

> Both omit the authority component, the first like mailto:, the second
> like file:.

When in doubt, think of xmpp: URIs as like mailto:, not like file: or
http: or some other hierarchical scheme.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6751 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20090225/75b530ea/attachment-0003.bin>


More information about the JDev mailing list