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

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

SVN commit 708880 by adawit:

- 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.  Fixes a long \
standing bug report.

BUG: 86208


 M  +8 -11     kcookiejar.cpp  


--- branches/KDE/3.5/kdelibs/kioslave/http/kcookiejar/kcookiejar.cpp #708879:708880
@@ -369,19 +369,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 either 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