[epiphany] ephy-web-app-utils: Use soup_cookie_domain_matches to check the cookie domain



commit 19dca7b70c9477c72880b2983275883205dbed98
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Thu Jul 12 10:02:26 2012 +0200

    ephy-web-app-utils: Use soup_cookie_domain_matches to check the cookie domain
    
    This fixes the cases where sites like www.foo.com save cookies for
    domain .foo.com, so that when an app is created for www.foo.com, cookies
    in the current jar for the domain .foo.com are not copied to the app
    cookie jar.

 lib/ephy-web-app-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index bd47171..62e3e1c 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -294,7 +294,7 @@ create_cookie_jar_for_domain (const char *address, const char *directory)
   for (p = cookies; p; p = p->next) {
     SoupCookie *cookie = (SoupCookie*)p->data;
 
-    if (g_str_has_suffix (cookie->domain, domain))
+    if (soup_cookie_domain_matches (cookie, domain))
       soup_cookie_jar_add_cookie (new_jar, cookie);
     else
       soup_cookie_free (cookie);



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