diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-14 08:39:05 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-14 09:16:13 (GMT) |
commit | 252fa3d8fa159791a0762a3e02c1594a34a104af (patch) | |
tree | 3534e641e43195ab8d7e0cb645b5d56e80301ca6 /src/network | |
parent | 0baa15e68c7b2e009c1f81f81148939725c216c8 (diff) | |
download | Qt-252fa3d8fa159791a0762a3e02c1594a34a104af.zip Qt-252fa3d8fa159791a0762a3e02c1594a34a104af.tar.gz Qt-252fa3d8fa159791a0762a3e02c1594a34a104af.tar.bz2 |
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')
-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 aef1258..d747345 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; |