[evolution-ews] Handle cookies (non-persistently)



commit 73914e5ee549638056fce5d54a6714988b1b4f8a
Author: Daniel Sands <dnsands sandia gov>
Date:   Wed Jul 23 12:09:01 2014 +0100

    Handle cookies (non-persistently)
    
    In a load-balanced environment, correctly handling the 'exchangecookie'
    cookie is important because it is used to preserve server affinity, and
    certain operations which require server-based state will fail without it.
    
    
http://blogs.msdn.com/b/exchangedev/archive/2011/07/20/client-access-server-affinity-and-network-load-balancing-considerations-for-programmatic-access-to-exchange-online.aspx
    https://bugzilla.gnome.org/show_bug.cgi?id=732850#c70

 src/server/e-ews-connection.c   |    3 +++
 src/server/e-ews-notification.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 4102833..b0aa901 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1903,6 +1903,9 @@ e_ews_connection_init (EEwsConnection *cnc)
                g_object_unref (logger);
        }
 
+       soup_session_add_feature_by_type (cnc->priv->soup_session,
+                                         SOUP_TYPE_COOKIE_JAR);
+
        cnc->priv->subscriptions = g_hash_table_new_full (
                        g_direct_hash, g_direct_equal,
                        NULL, e_ews_connection_folders_list_free);
diff --git a/src/server/e-ews-notification.c b/src/server/e-ews-notification.c
index e21f6db..cbd6eb1 100644
--- a/src/server/e-ews-notification.c
+++ b/src/server/e-ews-notification.c
@@ -282,6 +282,9 @@ e_ews_notification_init (EEwsNotification *notification)
 
        notification->priv->soup_session = soup_session_sync_new ();
 
+       soup_session_add_feature_by_type (notification->priv->soup_session,
+                                         SOUP_TYPE_COOKIE_JAR);
+
        log_level = e_ews_debug_get_log_level ();
        if (log_level >= 2) {
                SoupLogger *logger;


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