Little patch to make spice-gtk accept RFC-conform URLs of the form "spice://host/?port=5901".
I didn't add '/' to the list of the other characters to ignore (?;&) by intention since an URL like spice://host/?port=5901/somotherstuff should not be valid, resp. the password may contain '/' because the string is already unescaped at that point. Unfortunately glib does not seem to have functions to 'explode' an URI which would be really helpful. Cheers, Tiziano --- gtk/spice-session.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/gtk/spice-session.c b/gtk/spice-session.c index 3ce80d5..90e0318 100644 --- a/gtk/spice-session.c +++ b/gtk/spice-session.c @@ -290,6 +290,10 @@ static int spice_uri_parse(SpiceSession *session, const char *original_uri) if (sscanf(uri, "spice://%127[-.0-9a-zA-Z]%n", host, &len) != 1) goto fail; pos += len; + + if (uri[pos] == '/') + pos++; + for (;;) { if (uri[pos] == '?' || uri[pos] == ';' || uri[pos] == '&') { pos++; -- 1.7.7 -- stepping stone GmbH Neufeldstrasse 9 CH-3012 Bern Telefon: +41 31 332 53 63 www.stepping-stone.ch tiziano.muel...@stepping-stone.ch _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel