summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/networkaccessmanager.cpp13
-rw-r--r--src/networkaccessmanager.h2
2 files changed, 8 insertions, 7 deletions
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index 99337206..95b768d9 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -45,19 +45,20 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent)
}
-QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
+QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
{
QNetworkReply *reply = 0;
+ QNetworkRequest req = request;
+ req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
+ req.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache);
+// if (!m_acceptLanguage.isEmpty())
+// req.setRawHeader("Accept-Language", m_acceptLanguage);
+
switch(op)
{
case QNetworkAccessManager::HeadOperation:
kDebug() << "HEAD OPERATION";
-// if(outgoingData)
-// {
-// QByteArray outgoingDataByteArray = outgoingData->peek(1024 * 1024);
-// kDebug() << outgoingDataByteArray;
-// }
break;
case QNetworkAccessManager::GetOperation:
diff --git a/src/networkaccessmanager.h b/src/networkaccessmanager.h
index 352f67d6..b2a111f8 100644
--- a/src/networkaccessmanager.h
+++ b/src/networkaccessmanager.h
@@ -48,7 +48,7 @@ public:
NetworkAccessManager(QObject *parent);
protected:
- virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData = 0);
+ virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData = 0);
private:
WebPage *_parentPage;