Set new cookie expire time if timeout is not 0.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 21 Oct 2013 17:32:50 +0000 (19:32 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 21 Oct 2013 17:32:50 +0000 (19:32 +0200)
src/session.c

index daa804a..e63e75b 100644 (file)
@@ -82,7 +82,7 @@ static SoupCookieJar *cookiejar_new(const char *file, gboolean ro)
 static void cookiejar_changed(SoupCookieJar *self, SoupCookie *old_cookie, SoupCookie *new_cookie)
 {
     flock(COOKIEJAR(self)->lock, LOCK_EX);
-    if (new_cookie && !new_cookie->expires) {
+    if (new_cookie && !new_cookie->expires && vb.config.cookie_timeout) {
         soup_cookie_set_expires(new_cookie, soup_date_new_from_now(vb.config.cookie_timeout));
     }
     SOUP_COOKIE_JAR_CLASS(cookiejar_parent_class)->changed(self, old_cookie, new_cookie);