GNOME Bugzilla – Bug 679369
Port cookies persistency to WebKit2
Last modified: 2012-07-13 10:03:41 UTC
Persistent cookies are stored in a sqlite database, but WebKit2 doesn't have API to specify a location for the sqlite database yet. See WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=83016
Created attachment 218611 [details] [review] Patch
Review of attachment 218611 [details] [review]: ::: lib/ephy-web-app-utils.c @@ +266,3 @@ + filename = g_build_filename (ephy_dot_dir (), "cookies.sqlite", NULL); + jar = (SoupCookieJar*)soup_cookie_jar_sqlite_new (filename, TRUE); + g_free (filename); I see this as a less-than-ideal solution. I think we really need to add API to read the cookies in the current jar, having to create read-only jars each time we want to access them seems like a no-go. Can you perhaps add here a TODO or FIXME mentioning that? Also, I'm not 100% sure that it's actually ok to do this, although I cannot think how it could fail given that the jar is read-only, we create it temporarily to read the cookies, and close it immediately after.
(In reply to comment #2) > Review of attachment 218611 [details] [review]: > > ::: lib/ephy-web-app-utils.c > @@ +266,3 @@ > + filename = g_build_filename (ephy_dot_dir (), "cookies.sqlite", NULL); > + jar = (SoupCookieJar*)soup_cookie_jar_sqlite_new (filename, TRUE); > + g_free (filename); > > I see this as a less-than-ideal solution. I think we really need to add API to > read the cookies in the current jar, having to create read-only jars each time > we want to access them seems like a no-go. I agree, fortunately creating web apps is not something you have to do often. > Can you perhaps add here a TODO or > FIXME mentioning that? Sure. > Also, I'm not 100% sure that it's actually ok to do this, although I cannot > think how it could fail given that the jar is read-only, we create it > temporarily to read the cookies, and close it immediately after. Yes, I don't think it's a problem.