summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Grunt <pgrunt@redhat.com>2016-06-21 15:13:31 +0200
committerPavel Grunt <pgrunt@redhat.com>2016-06-21 15:25:35 +0200
commitea37f06eaa11b6307c797895aeb85d87d142625a (patch)
treef4e8b9de2475b867b4dc4fd6ba6463f4e57b6718
parent20a423f78d163f5edb3bbb308addcb6fd67404a7 (diff)
session: Keep brackets around ipv6 hostname
According to rfc2732: "To use a literal IPv6 address in a URL, the literal address should be enclosed in "[" and "]" characters." Resolves: rhbz#1331777 Acked-by: Marc-André Lureau <mlureau@redhat.com>
-rw-r--r--src/spice-session.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spice-session.c b/src/spice-session.c
index 888d9fb..db283d4 100644
--- a/src/spice-session.c
+++ b/src/spice-session.c
@@ -476,7 +476,7 @@ static int spice_parse_uri(SpiceSession *session, const char *original_uri)
}
tmp[0] = '\0';
tmp++;
- host = g_strdup(authority + 1);
+ host = g_strdup_printf("[%s]", authority + 1);
if (tmp[0] == ':')
port = g_strdup(tmp + 1);
} else {