[evolution-data-server] Bug #633332 - Preserve port number in WebDAV address book
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #633332 - Preserve port number in WebDAV address book
- Date: Wed, 8 Dec 2010 14:58:47 +0000 (UTC)
commit f07a3cc644555c3178337abe7b31995708567e86
Author: Milan Crha <mcrha redhat com>
Date: Wed Dec 8 15:57:20 2010 +0100
Bug #633332 - Preserve port number in WebDAV address book
.../backends/webdav/e-book-backend-webdav.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c b/addressbook/backends/webdav/e-book-backend-webdav.c
index f98051d..f851c9c 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -1215,6 +1215,7 @@ e_book_backend_webdav_load_source (EBookBackend *backend,
gchar *filename;
SoupSession *session;
SoupURI *suri;
+ gint port;
/* will try fetch ctag for the first time, if it fails then sets this to FALSE */
priv->supports_getctag = TRUE;
@@ -1253,6 +1254,7 @@ e_book_backend_webdav_load_source (EBookBackend *backend,
return;
}
+ port = soup_uri_get_port (suri);
use_ssl = e_source_get_property (source, "use_ssl");
if (use_ssl != NULL && strcmp (use_ssl, "1") == 0) {
soup_uri_set_scheme (suri, "https");
@@ -1260,6 +1262,9 @@ e_book_backend_webdav_load_source (EBookBackend *backend,
soup_uri_set_scheme (suri, "https");
}
+ if (port > 0 && port != soup_uri_get_port (suri))
+ soup_uri_set_port (suri, port);
+
/* append slash if missing */
if (!suri->path || !*suri->path || suri->path[strlen (suri->path) - 1] != '/') {
gchar *new_path = g_strconcat (suri->path ? suri->path : "", "/", NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]