summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-14 15:45:35 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-10-14 15:45:35 +0200
commit4456984da780b14572e1ec0f079a4d349ab299bd (patch)
treef586a281a81c57c91c49e83a5d3ec6c7eece0578 /src/network/access/qhttpnetworkconnection.cpp
parente824abd987d77efaa085fe1f9fb514d270798d55 (diff)
parent281121697340084f7d385eab530f41916789b94d (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index c2d986ef3d..c4cb8e65c0 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -326,7 +326,7 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair)
QByteArray host;
if (add.setAddress(hostName)) {
if (add.protocol() == QAbstractSocket::IPv6Protocol)
- host = "[" + hostName.toLatin1() + "]";//format the ipv6 in the standard way
+ host = '[' + hostName.toLatin1() + ']'; //format the ipv6 in the standard way
else
host = hostName.toLatin1();
@@ -888,8 +888,13 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
// if HTTP mandates we should close
// or the reply is not finished yet, e.g. it was aborted
// we have to close that connection
- if (reply->d_func()->isConnectionCloseEnabled() || !reply->isFinished())
- channels[i].close();
+ if (reply->d_func()->isConnectionCloseEnabled() || !reply->isFinished()) {
+ if (reply->isAborted()) {
+ channels[i].abort();
+ } else {
+ channels[i].close();
+ }
+ }
QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
return;