diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-02-29 22:47:35 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-02-29 22:47:35 +0100 |
commit | 6e13caa8a8e6247e5e719d869846fd2d44844dae (patch) | |
tree | eab390ca9f602377543299da72ec020eb9b68aab /src/networkaccessmanager.cpp | |
parent | clean up SSL data retrieve (diff) | |
download | rekonq-6e13caa8a8e6247e5e719d869846fd2d44844dae.tar.xz |
Clean up KIO/AccessManager integration
Diffstat (limited to 'src/networkaccessmanager.cpp')
-rw-r--r-- | src/networkaccessmanager.cpp | 25 |
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); |