summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-15 12:32:51 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-15 12:32:51 (GMT)
commit1f5dd61acb50be6fd7c73d092caae88a57f4d8d9 (patch)
tree9ad943871185721377f6851e26552fe2e884d28c /src/network/access
parentc1026caddce5261b7cb944e36fff30a006e6d8c1 (diff)
parent71bcd941d577097ca99900554386c9f12d4353e3 (diff)
downloadQt-1f5dd61acb50be6fd7c73d092caae88a57f4d8d9.zip
Qt-1f5dd61acb50be6fd7c73d092caae88a57f4d8d9.tar.gz
Qt-1f5dd61acb50be6fd7c73d092caae88a57f4d8d9.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Add missing checks for httpReply in QNetworkHttpBackend.
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index abef8ab..aa477fb 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -737,7 +737,7 @@ void QNetworkAccessHttpBackend::readFromHttp()
void QNetworkAccessHttpBackend::replyFinished()
{
- if (httpReply->bytesAvailable())
+ if (!httpReply || httpReply->bytesAvailable())
// we haven't read everything yet. Wait some more.
return;
@@ -788,6 +788,9 @@ void QNetworkAccessHttpBackend::checkForRedirect(const int statusCode)
void QNetworkAccessHttpBackend::replyHeaderChanged()
{
+ if (!httpReply)
+ return;
+
setAttribute(QNetworkRequest::HttpPipeliningWasUsedAttribute, httpReply->isPipeliningUsed());
// reconstruct the HTTP header
@@ -1128,7 +1131,7 @@ bool QNetworkAccessHttpBackend::canResume() const
return false;
// Can only resume if server/resource supports Range header.
- if (httpReply->headerField("Accept-Ranges", "none") == "none")
+ if (!httpReply || httpReply->headerField("Accept-Ranges", "none") == "none")
return false;
// We only support resuming for byte ranges.