From kde-core-devel Mon Apr 23 17:12:19 2012 From: Alex Fiestas Date: Mon, 23 Apr 2012 17:12:19 +0000 To: kde-core-devel Subject: KIO / KWebView and PrivateBrowsing (Cookies) Message-Id: <2549317.s5HdYyfXhM () monsterbad> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=133520146629307 KWebView can't do Private Browsing because of KIO integration, need advice on how to fix it but first let me explain the issue. What I consider PrivateBrowsing: Private Browsing should have an empty CookieJar that will keep cookies only as long as the private browsing is activated, after that cookies will be removed. What is happening now? While in PrivateBrowsing all * new * cokies are created with an expiration date of "right now" and stored in kcookiejar. This is done by calling AccessManager::setDisablecookieStorage(false) and stored in CookieJar::setCookiesFromUrl. File: kdelibs/kio/kio/accessmanager.cpp All existing cookies will still be available to KWebPage, so even though I'm in PrivateBrowser authentifications will remain as well as any other information stored in the cookies. As a practical usecase, in akonadi-google we need an empty cookieJar so any previous authentification on GMail will be ignored (for example I can be authentificated with X account on rekonq while configuring Y account on akonadi-google). Where is the problem located? As far as I understood the code there are two problems: -kio_http uses KCookieJar directly, and it doesn't have a Cookie mode like the one we need. It has: none, manual, auto we will need another one (private?). -kio_http won't use any new QNetworkCookieJar we set via AccessManager::setNetworkCookieJar. This is more difficult to fix since kio_http is out of process. Maybe we can use some kind of DBus magic? What do you think? makes any sense what I said? I'm missing something? Thanks !