summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-08-19 19:04:12 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-08-19 19:04:12 +0200
commitc2f9b53602b9791cc16a6ce2b33b71f15a9024cf (patch)
tree632566f5ddcc0bad75d735f5d466299f8af663a4
parentInserting webview winId metadata in cookiejar (diff)
downloadrekonq-c2f9b53602b9791cc16a6ce2b33b71f15a9024cf.tar.xz
Rude NetworkAccessManager hack to fix POST operations for 0.2 release ;)
I hope we could revert this commit in a while..
-rw-r--r--src/cookiejar.cpp2
-rw-r--r--src/networkaccessmanager.cpp11
-rw-r--r--src/networkaccessmanager.h3
3 files changed, 14 insertions, 2 deletions
diff --git a/src/cookiejar.cpp b/src/cookiejar.cpp
index bef1c51c..5160d6ed 100644
--- a/src/cookiejar.cpp
+++ b/src/cookiejar.cpp
@@ -68,7 +68,6 @@ QList<QNetworkCookie> CookieJar::cookiesForUrl(const QUrl & url) const
if (reply.isValid())
{
cookieList << reply.value().toUtf8();
- //kDebug() << reply.value();
}
else
{
@@ -87,7 +86,6 @@ bool CookieJar::setCookiesFromUrl(const QList<QNetworkCookie> & cookieList, cons
cookieHeader = "Set-Cookie: ";
cookieHeader += cookie.toRawForm();
m_kcookiejar->call("addCookies", url.toString(), cookieHeader, m_windowId);
- //kDebug() << "url: " << url.host() << ", cookie: " << cookieHeader;
}
return !m_kcookiejar->lastError().isValid();
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index 159a30a2..a06b20aa 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -208,3 +208,14 @@ KIO::MetaData& NetworkAccessManager::metaData()
{
return m_metaData;
};
+
+
+QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
+{
+ // FIXME: rude hack. Waiting for a real POST behaviour fix ;)
+ if(op == PostOperation)
+ {
+ return QNetworkAccessManager::createRequest(op,req,outgoingData);
+ }
+ return AccessManager::createRequest(op,req,outgoingData);
+}
diff --git a/src/networkaccessmanager.h b/src/networkaccessmanager.h
index e04df15c..a6c264f2 100644
--- a/src/networkaccessmanager.h
+++ b/src/networkaccessmanager.h
@@ -54,6 +54,9 @@ public:
public slots:
void loadSettings();
+protected:
+ virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0);
+
private slots:
void authenticationRequired(QNetworkReply *reply, QAuthenticator *auth);
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth);