diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-11 03:38:15 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-11 03:40:02 (GMT) |
commit | f16733d41b8377a703c594b069cc592466e03a11 (patch) | |
tree | 66cde819c4da0651a9c55f213c90673f2d78617d /src/network | |
parent | c2b9767dfc0fb2f26ff52bdded36c76c0a23f938 (diff) | |
download | Qt-f16733d41b8377a703c594b069cc592466e03a11.zip Qt-f16733d41b8377a703c594b069cc592466e03a11.tar.gz Qt-f16733d41b8377a703c594b069cc592466e03a11.tar.bz2 |
We don't need to migrate cached replies.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qnetworkreplyimpl.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 81d4d0d..7f12fb8 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -829,6 +829,11 @@ bool QNetworkReplyImplPrivate::migrateBackend() return false; } + if (copyDevice) { + qDebug() << "Request is serviced from cache, not migrating."; + return true; + } + RawHeadersList::ConstIterator it = findRawHeader("Accept-Ranges"); if (it == rawHeaders.constEnd() || it->second == "none") { qDebug() << "Range header not supported by server/resource."; @@ -837,12 +842,6 @@ bool QNetworkReplyImplPrivate::migrateBackend() qDebug() << "Need to check for only cacheable content."; - // stop both upload and download - if (outgoingData) - outgoingData->disconnect(q); - if (copyDevice) - copyDevice->disconnect(q); - state = QNetworkReplyImplPrivate::Reconnecting; if (backend) { |