[evolution-ews/evolution-ews-3-12] Handle cookies (non-persistently)



commit ce9ce73adff64bff351493e0c885a9233da99d1d
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
    
    (cherry picked from commit 73914e5ee549638056fce5d54a6714988b1b4f8a)

 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 998265d..8bfcf49 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1879,6 +1879,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 df6c43a..71e58a8 100644
--- a/src/server/e-ews-notification.c
+++ b/src/server/e-ews-notification.c
@@ -262,6 +262,9 @@ e_ews_notification_init (EEwsNotification *notification)
                SOUP_SESSION_USE_NTLM, TRUE,
                NULL);
 
+       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]