diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-24 15:34:48 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-24 16:56:14 +0200 |
commit | 45933caa6faf6310b0b7ecb57a10ce632514aa6c (patch) | |
tree | baaad0c460cc86dfdd2370dd3a31411bfaeba5a2 /src | |
parent | rekonq 0.4.64 (diff) | |
download | rekonq-45933caa6faf6310b0b7ecb57a10ce632514aa6c.tar.xz |
Network Access Manager, first improvements
Diffstat (limited to 'src')
-rw-r--r-- | src/networkaccessmanager.cpp | 13 | ||||
-rw-r--r-- | src/networkaccessmanager.h | 2 |
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; |