Version: latest git snapshot (using KDE 4.5.0) OS: Linux For quite some time now Rekonq looses cookies. This manifests in that a) I need to repeatedly login, into say gmail, even though I ticked 'remember me'. What's more, it even looses cookies on the fly at times. For example whenever I try to log into my wordpress.com admin page. Konqueror works just fine. Also I just tried resetting my kcookiejar (in case that was the POF), still no dice. Reproducible: Always Steps to Reproduce: What triggers the issue for me every time is going to apachelog.wordpress.com/wp-admin (which would lead to the admin area of my blog). Login there. Actual Results: I end up in my admin area as loads of ajax content loads, suddenly login fields pop up where actual content should be ... a refresh of the page will bring me back to the login. Expected Results: It would be very expectable that rekonq does not loose cookies. OS: Linux (x86_64) release 2.6.35-19-generic Compiler: cc
commit c0bc8cfe4a9b8240b2261109c8f1e0124efac05d Author: Andrea Diamantini <adjam7@gmail.com> Date: Mon Sep 6 01:39:56 2010 +0200 Revert "This hacks should fix (a lot of) javascript handling." Really sorry. Proposed fix does not handle cookies This reverts commit b08c67eb1e45cb94dc6250fe555d84f0c0e7debe. CCBUG:250298 diff --git a/src/analyzer/networkanalyzer.cpp b/src/analyzer/networkanalyzer.cpp index d0044f4..c5b0883 100644 --- a/src/analyzer/networkanalyzer.cpp +++ b/src/analyzer/networkanalyzer.cpp @@ -162,8 +162,7 @@ void NetworkAnalyzer::requestFinished( QObject *replyObject ) QString contentType = reply->header( QNetworkRequest::ContentTypeHeader ).toString(); item->setText( 4, contentType ); - if ( status == 302 ) - { + if ( status == 302 ) { QUrl target = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl(); item->setText( 5, i18n("Redirect: %1", target.toString() ) ); } diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index 60fecac..9d9101b 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -86,18 +86,10 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat } // WARNING - // There are actually 3 exceptions here handled with QNAM + // There are actually 2 exceptions here handled with QNAM // instead of KIO that need fixes upstream before removing. They are: - // 1) AJAX requests handling - // 2) DeleteOperation - // 3) CustomOperation - - // this is used to handle "AJAX" requests - QByteArray header = req.rawHeader("x-requested-with"); - if(!header.isNull()) - { - return QNetworkAccessManager::createRequest(op, req, outgoingData); - } + // 1) DeleteOperation + // 2) CustomOperation switch(op) { @@ -118,14 +110,14 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat kDebug() << "DELETE OPERATION..."; reply = QNetworkAccessManager::createRequest(op, req, outgoingData); if(!reply) - kDebug() << "oh oh... DELETE REPLY NULL"; + kDebug() << "OOOOOOOOOOOOOOOOOOO DELETE REPLY NULL"; break; case QNetworkAccessManager::CustomOperation: kDebug() << "CUSTOM OPERATION..."; reply = QNetworkAccessManager::createRequest(op, req, outgoingData); if(!reply) - kDebug() << "oh oh... CUSTOM REPLY NULL"; + kDebug() << "OOOOOOOOOOOOOOOOOOO CUSTOM REPLY NULL"; break; default: diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index c0b8a6c..be23684 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -85,7 +85,6 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra // javascript handling if (_url.protocol() == QL1S("javascript")) { - kDebug() << "JAVASCRIPT URL: " << _url; QString scriptSource = _url.authority(); if(scriptSource.isEmpty()) { // if javascript:<code here> then authority() returns
Works again. Thanks :)