Created attachment 64645 [details] Fix cookie management dialog not showing some cookies Version: Git (using Devel) OS: Linux In "Configure konqueror..." -> cookies -> management, sometimes cookies are not shown when clicking on an item. An example is given by cookies from forums.gentoo.org. This happens after commit ee6b38ff9c989e9dff9a6646fd68d0878868027e which does the following: --- a/kioslave/http/kcookiejar/kcookiejar.cpp +++ b/kioslave/http/kcookiejar/kcookiejar.cpp @@ -1110,7 +1110,7 @@ KHttpCookieList *KCookieJar::getCookieList(const QString & _domain, if (_domain.isEmpty()) stripDomain(_fqdn, domain); else - stripDomain (_domain, domain); + domain = _domain; return m_cookieDomains.value(domain); } The problem is fixed by integrating that commit with an analogous change in stripDomain(const KHttpCookie& cookie): (see also attached patch) --- a/kioslave/http/kcookiejar/kcookiejar.cpp +++ b/kioslave/http/kcookiejar/kcookiejar.cpp @@ -532,7 +532,7 @@ QString KCookieJar::stripDomain(const KHttpCookie& cookie) if (cookie.domain().isEmpty()) stripDomain( cookie.host(), domain); else - stripDomain( cookie.domain(), domain); + domain = cookie.domain(); return domain; } Reproducible: Always Steps to Reproduce: Visit forums.gentoo.org, go to "Configure konqueror..." -> cookies -> management and click on cookie list. Actual Results: Cookie details not shown. Expected Results: Cookie details shown.
This has already been fixed in the kdelibs 4.7 and frameworks branches. See https://projects.kde.org/projects/kde/kdelibs/repository/revisions/ee6b38ff9c989e9dff9a6646fd68d0878868027e Hopefully you generated the patch against an older version of kdelibs code base because the master branch of kdelibs is dead and should not be used.
> https://projects.kde.org/projects/kde/kdelibs/repository/revisions/ee6b38ff9c989e9dff9a6646fd68d0878868027e Hi Dawit, actually what I wanted to say is that the commit above fixes the cookies not showing for some sites, but causes cookies not showing for other sites. That commit changes the logic in KCookieJar::getCookieList(...), however the same logic is duplicated in KCookieJar::stripDomain(const KHttpCookie& cookie). With the attached patch the logic is changed there in the same way. In my testing, this fixes all the occurrences of cookies not showing, both old testcases and new ones.
I have the same or at least a very similar issue and I am not sure if it has been fixed since. With KDE 4.6.5, cookies where the domain value is empty are not listed in the cookie management dialog. They are listed in the file ~/.kde/share/apps/kcookiejar/cookies. I am a bit confused about the different between the 'host' and the 'domain' values. In any case, cookies without a domain value are not listed under the relevant host. Apparently, this is the issue that Dawitt said got fixed in the 4.7 branch, but since Gregorio seems to be having further issues despite the fix, I thought I'd report this, just in case... Thanks.
Git commit 01c0d95e025d8c6e297db7a89a3d2929b05ca1f9 by Dawit Alemayehu. Committed on 20/04/2012 at 16:54. Pushed by adawit into branch 'KDE/4.8'. Fixed the issue of some cookies not showing up in the cookie management dialog. FIXED-IN: 4.8.3 M +1 -1 kioslave/http/kcookiejar/kcookiejar.cpp http://commits.kde.org/kdelibs/01c0d95e025d8c6e297db7a89a3d2929b05ca1f9
Thank you, Dawit!
Git commit 2b0f80a196425724080ff4af9e5fc9375e9a592a by Ivan Čukić, on behalf of Dawit Alemayehu. Committed on 20/04/2012 at 16:54. Pushed by ivan into branch 'ivan/plasma-active-patches'. Fixed the issue of some cookies not showing up in the cookie management dialog. FIXED-IN: 4.8.3 M +1 -1 kioslave/http/kcookiejar/kcookiejar.cpp http://commits.kde.org/kdelibs/2b0f80a196425724080ff4af9e5fc9375e9a592a