[gvfs/wip/oholy/davs-sd-ipv6: 14/16] dav: Remove brackets from IPv6 address before use
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/davs-sd-ipv6: 14/16] dav: Remove brackets from IPv6 address before use
- Date: Thu, 10 Oct 2019 15:55:49 +0000 (UTC)
commit a91b93c3cc83b688f9d1a65345356edea244efc5
Author: Ondrej Holy <oholy redhat com>
Date: Wed Sep 18 13:40:44 2019 +0200
dav: Remove brackets from IPv6 address before use
This is follow up of commit d8556a0, which removes brackets when mounting
over dav/davs schemes, however, the same fix is also needed when mounting
over dav+sd/davs+sd schemes in order to prevent "Invalid URI" error.
daemon/gvfsbackenddav.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 3cec795d..05297548 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -1787,7 +1787,11 @@ dav_uri_from_dns_sd_resolver (GVfsBackendDav *dav_backend)
soup_uri_set_port (uri, port);
- soup_uri_set_host (uri, address);
+ /* IPv6 host does not include brackets in SoupURI, but GVfsDnsSdResolver host does */
+ if (gvfs_is_ipv6 (address))
+ uri->host = g_strndup (address + 1, strlen (address) - 2);
+ else
+ soup_uri_set_host (uri, address);
if (path != NULL)
soup_uri_set_path (uri, path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]