After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766631 - GVFS webdav fails when connection to IPv6 address.
GVFS webdav fails when connection to IPv6 address.
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: webdav backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2016-05-18 20:30 UTC by Kevin Cox
Modified: 2016-05-20 08:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dav: Fix IPv6 address handling (1.73 KB, patch)
2016-05-19 12:34 UTC, Ondrej Holy
committed Details | Review

Description Kevin Cox 2016-05-18 20:30:35 UTC
When connecting to an IPv6 address the webdav backend incorrectly attempts to resolve it as a hostname.

$ gvfs-mount dav://[2607:fea8:2121:2c:f6b7:e1ff:fe9a:9235]:44017
Error mounting location: HTTP Error: Error resolving '[2607:fea8:2121:2c:f6b7:e1ff:fe9a:9235]': Name or service not known

This error shows itself when attempting to connect to a webdav gnome-user-share on a LAN as the IPv6 address is preferred and this error occurs.

I have worked around this problem by disabling IPv6 in avahi but that is an ugly workaround.
Comment 1 Ondrej Holy 2016-05-19 12:33:42 UTC
Thanks for your bug report. You are right, dav backend doesn't work correctly with IPv6 addresses, however it seems http backend works correctly. 

I see following warning with IPv6 with dav backend. The address contains double brackets, which is obviously wrong:
(process:25588): GLib-GIO-WARNING **: Invalid URI 'http://[[2620:52:0:2203:c534:3eff:dd41:7331]]:34360/'
Comment 2 Ondrej Holy 2016-05-19 12:34:07 UTC
Created attachment 328182 [details] [review]
dav: Fix IPv6 address handling

It is not possible to mount WebDAV share with IPv6 address currently. GMountSpec host contains brackets around the IPv6 address, however SoupURI doesn't. This patch handles this when converting GMountSpec to SoupURI and vice versa.
Comment 3 Ondrej Holy 2016-05-19 12:38:12 UTC
The attached patch should fix it. Are you willing to test it?
Comment 4 Kevin Cox 2016-05-19 12:50:26 UTC
Yeah, I'll see if I can get it built today.
Comment 5 Kevin Cox 2016-05-19 13:15:43 UTC
Yup! This fixes it! Thank you so much.
Comment 6 Ondrej Holy 2016-05-20 08:05:44 UTC
Comment on attachment 328182 [details] [review]
dav: Fix IPv6 address handling

Thanks for testing! Pushed to master (265c237) and gnome-3-20 (200de32).