summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);