From 19dca7b70c9477c72880b2983275883205dbed98 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Thu, 12 Jul 2012 10:02:26 +0200 Subject: 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 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ephy-web-app-utils.c') diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c index bd4717199..62e3e1cc3 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); -- cgit v1.2.3