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 633332 - Preserve port number in WebDAV address book
Preserve port number in WebDAV address book
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Plugins
2.30.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-plugin-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2010-10-28 08:48 UTC by Keith Jay Gillis
Modified: 2011-01-25 21:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Keith Jay Gillis 2010-10-28 08:48:56 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.
Comment 1 David Sterratt 2010-11-15 16:14:14 UTC
I can confirm that I observe this behaviour too, in evolution 2.30.3.
Comment 2 David Sterratt 2010-11-16 16:36:02 UTC
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").
Comment 3 Keith Jay Gillis 2010-11-16 22:33:20 UTC
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.
Comment 4 Milan Crha 2010-12-08 14:55:19 UTC
(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.
Comment 5 Milan Crha 2010-12-08 15:00:03 UTC
Created commit f07a3cc in eds master (2.91.4+)
Created commit fb18743 in evo master (2.91.4+)
Comment 6 David Sterratt 2010-12-13 11:38:44 UTC
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.