[Bug 30296] Add Conn.I.Addressing support to Gabble

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Nov 16 17:11:40 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=30296

--- Comment #16 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2011-11-16 08:11:40 PST ---
I now realise that gabble_parse_uri() doesn't perform RFC 3986 (URI generic
syntax) processing. If a JID is "wtf?@example.com", then its correct URI form
is "xmpp:wtf%63 at example.com" - you probably want to use g_uri_escape_string()
and g_uri_unescape_string() for this.

(This is really more of a bug in the Protocol layer of URI support than the
Connection layer, though.)

I feel as though gabble_parse_uri() is the wrong function name: it's really
gabble_normalize_uri(). It'd maybe make more sense to split it into
gabble_uri_to_jid() and gabble_jid_to_uri()?

gabble_uri_for_handle() doesn't do URI escaping either, and should probably
delegate to gabble_jid_to_uri() for that.

I'm not sure whether the "jid" side of the JID <-> URI functions should be a
JID, or a (node or NULL, hostname, resource or NULL) tuple. Probably the
latter, using wocky_decode_jid() (or gabble_decode_jid(), but that's just a
thin wrapper around the Wocky equivalent) - you can use gabble_encode_jid() to
go the other way.

Perhaps functions to map between URIs and JIDs, or URIs and JID component
tuples, should eventually move into Wocky anyway? Probably out-of-scope for
this branch, though.

The vCard cases look fine now.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.



More information about the telepathy-bugs mailing list