summaryrefslogtreecommitdiff
path: root/src/networkaccessmanager.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-02-29 22:47:35 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-02-29 22:47:35 +0100
commit6e13caa8a8e6247e5e719d869846fd2d44844dae (patch)
treeeab390ca9f602377543299da72ec020eb9b68aab /src/networkaccessmanager.cpp
parentclean up SSL data retrieve (diff)
downloadrekonq-6e13caa8a8e6247e5e719d869846fd2d44844dae.tar.xz
Clean up KIO/AccessManager integration
Diffstat (limited to 'src/networkaccessmanager.cpp')
-rw-r--r--src/networkaccessmanager.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index 1cfcce42..99233aa1 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -62,37 +62,14 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat
QNetworkReply *reply = 0;
+ // set our "nice" accept-language header...
QNetworkRequest req = request;
- req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
req.setRawHeader("Accept-Language", _acceptLanguage);
- KIO::CacheControl cc = KProtocolManager::cacheControl();
- switch (cc)
- {
- case KIO::CC_CacheOnly: // Fail request if not in cache.
- req.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysCache);
- break;
-
- case KIO::CC_Refresh: // Always validate cached entry with remote site.
- req.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork);
- break;
-
- case KIO::CC_Reload: // Always fetch from remote site
- req.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork);
- break;
-
- case KIO::CC_Cache: // Use cached entry if available.
- case KIO::CC_Verify: // Validate cached entry with remote site if expired.
- default:
- req.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache);
- break;
- }
-
// Handle GET operations with AdBlock
if (op == QNetworkAccessManager::GetOperation)
reply = rApp->adblockManager()->block(req, parentPage);
-
if (!reply)
reply = AccessManager::createRequest(op, req, outgoingData);