summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-04-11 12:57:39 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-04-11 12:57:39 (GMT)
commitbd0e934769d37c270abcc3b29df407e93913ad3a (patch)
tree994c87ef445d1114135b0504e35439327df555c0 /src/network
parent1062da14facb7dd10f0928a4c242549d3626f9ba (diff)
parent6a8beac59f5824e1fc826f513495fbb8478b79ce (diff)
downloadQt-bd0e934769d37c270abcc3b29df407e93913ad3a.zip
Qt-bd0e934769d37c270abcc3b29df407e93913ad3a.tar.gz
Qt-bd0e934769d37c270abcc3b29df407e93913ad3a.tar.bz2
Merge remote branch 'earth/master' into symbian-socket-engine
Conflicts: tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index b0ca9e0..9de5d84 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -263,11 +263,6 @@ bool QNetworkAccessHttpBackend::loadFromCacheIfAllowed(QHttpNetworkRequest &http
httpRequest.setHeaderField("If-Modified-Since", QNetworkHeadersPrivate::toHttpDate(lastModified));
if (CacheLoadControlAttribute == QNetworkRequest::PreferNetwork) {
- // PreferNetwork == send request with "If-None-Match" and "If-Modified-Since" header,
- // which will return a 304 Not Modifed if resource has not been changed.
- // We might read from cache later, if receiving a 304.
- return false;
- } else if (CacheLoadControlAttribute == QNetworkRequest::PreferCache) {
it = cacheHeaders.findRawHeader("Cache-Control");
if (it != cacheHeaders.rawHeaders.constEnd()) {
QHash<QByteArray, QByteArray> cacheControl = parseHttpOptionHeader(it->second);
@@ -1156,7 +1151,7 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo
attributes.insert(QNetworkRequest::HttpStatusCodeAttribute, statusCode);
attributes.insert(QNetworkRequest::HttpReasonPhraseAttribute, reasonPhrase);
} else {
- // this is the server telling us the resource has not changed, keep the attributes intact
+ // this is a redirection, keep the attributes intact
attributes = oldMetaData.attributes();
}
metaData.setAttributes(attributes);