summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/networkaccessmanager.cpp25
-rw-r--r--src/webpage.cpp3
2 files changed, 2 insertions, 26 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);
diff --git a/src/webpage.cpp b/src/webpage.cpp
index a0bb5a6d..f641bebc 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -455,8 +455,7 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply)
const QVariant redirectVar = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
if (redirectVar.isValid())
{
- _sslInfo.restoreFrom(reply->attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)),
- reply->url());
+ _sslInfo.restoreFrom(reply->attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)), reply->url());
return;
}