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 627713 - Address book URL drops port #
Address book URL drops port #
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Contacts
2.30.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
: 639429 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-08-23 11:33 UTC by awilliam
Modified: 2014-02-10 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for the UI bug (667 bytes, patch)
2011-01-15 17:20 UTC, mathias
none Details | Review
patch for the logic bug (1015 bytes, patch)
2011-01-15 18:03 UTC, mathias
none Details | Review

Description awilliam 2010-08-23 11:33:23 UTC
If I enter a WebDAV Address book like "http://127.0.0.1:8080/dav/Favorites/Contacts/" as soon as I click OK it becomes "http://127.0.0.1/dav/Favorites/Contacts/".  The port # is dropped from the URL
Comment 1 awilliam 2010-08-23 11:34:27 UTC
openSUSE 64-bit
evolution-2.30.1.2-3.9.x86_64
Comment 2 peter 2010-12-27 10:41:32 UTC
The same bug.
Ubuntu Desktop 10.10 32-bit.
Evolution 2.30.3 (included in Ubuntu).
Comment 3 peter 2010-12-27 11:57:00 UTC
The same bug.
PC-BSD 8.1 32-bit.
Evolution 2.30.3.
Comment 4 André Klapper 2011-01-13 16:08:03 UTC
*** Bug 639429 has been marked as a duplicate of this bug. ***
Comment 5 mathias 2011-01-15 17:20:57 UTC
Created attachment 178397 [details] [review]
patch for the UI bug

In bug 639429 that I reported and that was marked as duplicate of this bug, I reported two slightly different issues that conjugate together to create this bug.

First, in this report there is some step to reproduce the bug, and, from what I understand, it is really a logic bug that should be easily reproducible by any evolution developer (thus this bug could be confirmed), at least with evolution 2.30.3

I have found the source of one of this issue: it is the line plugins/webdav-account-setup/webdav-contacts-source.c:127 of function set_ui_from_source.

The line is:
soup_uri_set_scheme (suri, use_ssl ? "https" : "http");

Even though use_ssl is set from the scheme of the source uri in set_source_from_ui the use_ssl propertys, somewhere else the scheme is set to "webdav", hence the need for this line. But, the soup_uri_set_scheme (as documented here : 
http://library.gnome.org/devel/libsoup/2.29/libsoup-24-SoupURI.html#soup-uri-set-scheme ) will also set the port number of the SoupURI object and not only the scheme. Thus it delete the port given by the user.

The attached patch fix this issue (that is the UI glitch). But the overall bug remains (as expected). I believe that the soup_uri_set_scheme is called elsewhere with the same effect, but I did not find, yet, from where.
Comment 6 mathias 2011-01-15 18:03:43 UTC
Created attachment 178400 [details] [review]
patch for the logic bug

Well, I just forgot to look into evolution-data-server...

I am attaching a patch which (together with the previous one) completely resolve this issue. Using the same technique than in the above patch  which fixed the UI bug. This patch goes in evolution-data-server, but I think that it is best put in this bug report.

A cleaner solution would be to have a function like soup_uri_set_scheme_keep_port in libsoup or it would be to not mess with the SoupURI scheme as is done currently within evolution. But still, accessing to webdav contact on a non-standard port now works.

As a bonus, my patch also fix a bug which prevented webdav to work altogether on http (as opposed to https).

The bug which can be closed are (at least, after a quick check) : bug 610572, bug 639508 and also bug 639469 (but it has been fixed two days ago, and its fix fixes my "bonus" bug).
Comment 7 Andrew McMillan 2011-01-15 22:19:29 UTC
Review of attachment 178400 [details] [review]:

A better port issue in the webdav backend seems to have already been applied, and the https-only issue was (as you point out) fixed a couple of days ago.
Comment 8 Andrew McMillan 2011-01-16 02:22:36 UTC
Review of attachment 178397 [details] [review]:

Something having the same effect as this patch appears to have already been applied to HEAD.
Comment 9 Vadim Rutkovsky 2013-01-04 10:51:41 UTC
Cannot reproduce anymore in evolution 3.6.2
Comment 10 awilliam 2014-02-10 14:07:19 UTC
This no longer occurs in Evolution.