GNOME Bugzilla – Bug 633332
Preserve port number in WebDAV address book
Last modified: 2011-01-25 21:24:50 UTC
Entering an address like https://example.com:8080 for a webdav addressbook does not work. After closing the add addressbook dialog evolution will attempt to connect on the default port. Opening the dialog again shows the port number has disappeared. Specifying a port works fine for caldav calendar tasks and memos.
I can confirm that I observe this behaviour too, in evolution 2.30.3.
I've worked out what's causing the problem: in set_ui_from_source() in webdav-contacts-source.c, the code: if (suri) soup_uri_set_scheme (suri, use_ssl ? "https" : "http"); resets suri->port to 443 (when ssl is used), as described at: http://library.gnome.org/devel/libsoup/2.29/libsoup-24-SoupURI.html#soup-uri-set-scheme I have been able to fix this problem with some code like this: guint port; if (suri) { port = suri->port; soup_uri_set_scheme (suri, use_ssl ? "https" : "http"); soup_uri_set_port (suri, port); } I can turn this into a patch at some point. However, I still can't get the webdav addressbook working. Evolution just appears to wait to speak to the server, but doesn't actually make contact, as evidenced from the server logs. Secure webdave does work using gvfs on the desktop ("Connect to server").
I can connect to my davical server from evolution as long as the connection is on the default port. I set the collection to use carddav, and even though evolution does not support carddav is does seem connect to the server and store contacts correctly. I haven't tried the webdav contacts plugin with any non-davical webdav servers.
(In reply to comment #2) > I've worked out what's causing the problem: in set_ui_from_source() in > webdav-contacts-source.c, Good catch. It requires similar change in the backend itself too, in evolution-data-server/addressbook/backends/webdav I'm committing the fix for you.
Created commit f07a3cc in eds master (2.91.4+) Created commit fb18743 in evo master (2.91.4+)
Thanks very much for doing this Milan. I would have replied sooner, but I was trying to test out the patch by compiling the master branch of evolution, but haven't managed to do so yet. I will have another go at some point.