[Spice-devel] [PATCH v2 1/3] proxy: support ipv6 addresses in brackets
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue Oct 13 00:57:42 PDT 2015
> On October 12, 2015 at 6:19 PM Christophe Fergeau <cfergeau at redhat.com> wrote:
> Hey,
>
> So we have both spice_uri_parse() and spice_parse_uri(), the former used
> for parsing proxy URIs, the latter for parsing spice:// URIs.
> spice_parse_uri() supports [] notation, but also knows how to unescape
> URI components (eg @ encoded as %40 in usernames), which
> spice_uri_parse() does not seem to be doing.
> Have you tried making these 2 functions use common code?
No, my motivation was somewhat limited on the one hand because of GUri, and on
the other hand because the chances of this code reaching our users any time soon
are quite low (we use debian stable...).
Might not need too much work though. spice_parse_uri is only used in one place,
so it could fill a SpiceURI instead of directly filling SpiceSessionPrivate, and
parse the scheme rather than just checking for and skipping 'spice://'. The
extra options (tls-port etc) are only needed once, so an additional optional
struct parameter could suffice there... (Making it too generic by filling a
key/value map doesn't seem worth the effort */me points to GUri yet again*). Ah
and SpiceURI also has passwords apparently. (I hope no one's passing URLs via
commandline arguments ;-))
More information about the Spice-devel
mailing list