[evolution-kolab] kolab-util-calendar: unset the CamelURL port for HTTP requests



commit 0398ddbbf58785fbede5f0a2936d9ce3c2ca1475
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Tue Sep 11 17:43:22 2012 +0200

    kolab-util-calendar: unset the CamelURL port for HTTP requests
    
    * the port number we read from CamelKolabIMAPXSettings is the
      configured IMAP port
    * this does not make sense for HTTP, so we just unset the port
      number and rely on the HTTP/HTTPS protocol type for port
      selection
    * this has the limitation that we presently cannot configure
      an explicit port number for HTTP(S) requests (e.g. to use
      some HTTP proxy)

 src/calendar/kolab-util-calendar.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/calendar/kolab-util-calendar.c b/src/calendar/kolab-util-calendar.c
index f43267f..5a2805f 100644
--- a/src/calendar/kolab-util-calendar.c
+++ b/src/calendar/kolab-util-calendar.c
@@ -53,6 +53,14 @@ util_calendar_create_http_request (KolabSettingsHandler *ksettings,
 	url = camel_kolab_imapx_settings_build_url (settings);
 	camel_url_set_path (url, path);
 
+	/* from the Camel settings, we will get set the configured IMAP
+	 * port, which we need to unset here for HTTP(S). The protocol
+	 * type (SSL/non-SSL) will be reflected in the URL, just we're
+	 * not yet able to set a custom port for HTTP(S). Instead, the
+	 * default ports for this protocol type will be used
+	 */
+	camel_url_set_port (url, 0);
+	
 	passwd = kolab_settings_handler_get_char_field (ksettings,
 	                                                KOLAB_SETTINGS_HANDLER_CHAR_FIELD_KOLAB_USER_PASSWORD,
 	                                                &tmp_err);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]