[jdev] Authority component in xmpp: URIs
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:///firstname.lastname@example.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:
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:
For the "host" rule see here (it also cannot be of zero length):
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6751 bytes
Desc: S/MIME Cryptographic Signature
More information about the JDev