[gnome-online-accounts/gnome-3-4] webview: Set the SoupSession's "accept-language-auto" to TRUE



commit 9ff5220622bcecb5f0bd4b6f1f0eaf8260d8cc0f
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon May 14 18:24:50 2012 +0200

    webview: Set the SoupSession's "accept-language-auto" to TRUE
    
    This is useful because Facebook sends the OAuth2 log in page in the
    wrong language unless the Accept-Language header is set.

 src/goabackend/goaoauth2provider.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index 617e51e..2cf2e54 100644
--- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c
@@ -749,6 +749,8 @@ get_tokens_and_identity (GoaOAuth2Provider  *provider,
       webkit_soup_session = webkit_get_default_session ();
       /* Get the proxy configuration from the GNOME settings */
       soup_session_add_feature_by_type (webkit_soup_session, SOUP_TYPE_PROXY_RESOLVER_GNOME);
+      /* Set the Accept-Language header automatically */
+      g_object_set (webkit_soup_session, "accept-language-auto", TRUE, NULL);
 
       /* Ensure we use an empty non-persistent cookie to avoid login
        * credentials being reused...



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