[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kioslave/http/kcookiejar
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2007-09-05 22:19:05
Message-ID: 1189030745.944286.13562.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 708882 by adawit:

- Forward port fix for BR# 86208. Send back automatically accepted session cookies. \
It makes no sense to automatically   accept session cookies if we are not going to \
automatically send them back regardless of the current global or  per-site   domain \
policy.


 M  +8 -11     kcookiejar.cpp  


--- trunk/KDE/kdelibs/kioslave/http/kcookiejar/kcookiejar.cpp #708881:708882
@@ -360,19 +360,16 @@
        if (cookieList->getAdvice() != KCookieDunno)
           advice = cookieList->getAdvice();
 
-       // Do not send cookies for this domain if policy is set to reject
-       // and we are not setup to automatically accept all cookies as
-       // session cookies...
-       if (advice == KCookieReject &&
-           !(m_ignoreCookieExpirationDate && m_autoAcceptSessionCookies))
-       {
-          if (it == domains.end())
-             break; // Finished.
-          continue;
-       }
-
        for ( cookie=cookieList->first(); cookie != 0; cookie=cookieList->next() )
        {
+          // If the we are setup to automatically accept all session cookies and to
+          // treat all cookies as session cookies or the current cookie is a session
+          // cookie, then send the cookie back regardless of domain policy.
+          if (advice == KCookieReject &&
+              !(m_autoAcceptSessionCookies && 
+                (m_ignoreCookieExpirationDate || cookie->expireDate() == 0)))
+              continue;
+
           if (!cookie->match(fqdn, domains, path))
              continue;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic