summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-08-28 08:41:26 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-08-28 08:58:44 (GMT)
commit05d6c58f239c9f72cf246b91fa89858aaf6cc0c5 (patch)
tree69db88d123925c7330361fafee3c0302159a9f26 /src/network
parent8ff968cc37c34121dc6a458df0d4d39850a54bff (diff)
downloadQt-05d6c58f239c9f72cf246b91fa89858aaf6cc0c5.zip
Qt-05d6c58f239c9f72cf246b91fa89858aaf6cc0c5.tar.gz
Qt-05d6c58f239c9f72cf246b91fa89858aaf6cc0c5.tar.bz2
QNAM HTTP Code: Do not cache Date header
The caching of this ever-changing header caused disk re-writes even if not necessary because the actual HTTP entity did not change. Task-number: 259961 Rev-By: Peter Hartmann
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 30f16da..faf04da 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -951,6 +951,12 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo
if (hop_by_hop)
continue;
+ // Do not copy over the Date header because it will be
+ // different for every request and therefore cause a re-write to
+ // the disk when a 304 is received inside replyHeaderChanged()
+ if (header == "date")
+ continue;
+
// Don't store Warning 1xx headers
if (header == "warning") {
QByteArray v = rawHeader(header);