diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-14 10:39:05 +0200 |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-14 11:16:13 +0200 |
commit | 252fa3d8fa159791a0762a3e02c1594a34a104af (patch) | |
tree | 3534e641e43195ab8d7e0cb645b5d56e80301ca6 /src/network/access/qhttpnetworkconnection.cpp | |
parent | 0baa15e68c7b2e009c1f81f81148939725c216c8 (diff) | |
download | qt4-tools-252fa3d8fa159791a0762a3e02c1594a34a104af.tar.gz |
QNAM HTTP Code: Backport a fix related to aborting replies
Backport af71faf8cb2c9cbf34c408b81ce7ae1ef6c6403e from 4.6 to
4.5.
Task-number: 261999
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index aef12589e5..d7473458fb 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -954,7 +954,10 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply) for (int i = 0; i < channelCount; ++i) { if (channels[i].reply == reply) { channels[i].reply = 0; - if (reply->d_func()->connectionCloseEnabled()) + // 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()->connectionCloseEnabled() || !reply->isFinished()) closeChannel(i); QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); return; |