GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 468a9b90 authored by Дилян Палаузов's avatar Дилян Палаузов Committed by Milan Crha

M!12 - [SRV config lookup] Do not write default ports in CalDAV/CardDAV URLs

Closes GNOME/evolution!12
parent 2fa97de8
......@@ -181,11 +181,14 @@ srv_config_lookup_domain_sync (EConfigLookup *config_lookup,
e_config_lookup_result_simple_add_string (lookup_result, extension_name, "user", email_address);
} else if (known_services[ii].kind == E_CONFIG_LOOKUP_RESULT_COLLECTION) {
gboolean is_calendar = g_str_equal (known_services[ii].evo_protocol, "caldav");
gboolean is_secure = g_str_has_suffix (known_services[ii].gio_protocol, "s");
guint16 port = g_srv_target_get_port (target);
gchar *url;
url = g_strdup_printf ("%s://%s:%d",
g_str_has_suffix (known_services[ii].gio_protocol, "s") ? "https" : "http",
hostname, g_srv_target_get_port (target));
if ((!is_secure && port == 80) || (is_secure && port == 443))
url = g_strdup_printf ("http%s://%s", is_secure ? "s" : "", hostname);
url = g_strdup_printf ("http%s://%s:%d", is_secure ? "s" : "", hostname, port);
e_config_lookup_result_simple_add_string (lookup_result, E_SOURCE_EXTENSION_COLLECTION,
"backend-name", "webdav");
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment