diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-08-12 15:29:29 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-08-12 15:37:02 (GMT) |
commit | 12f129eb1e1472e5eec561ab780ed709e5b66987 (patch) | |
tree | 6fd9a810ec0579cb617824d47aa1e4d4e193d242 /src | |
parent | b0d2a439314bc86e6e15fe033c1edaee471b4b95 (diff) | |
download | Qt-12f129eb1e1472e5eec561ab780ed709e5b66987.zip Qt-12f129eb1e1472e5eec561ab780ed709e5b66987.tar.gz Qt-12f129eb1e1472e5eec561ab780ed709e5b66987.tar.bz2 |
QNAM HTTP: Fix crash related to aborted uploads
Task-number: QTBUG-12285
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index def4c34..5de199e 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -651,6 +651,8 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply) // is the reply associated the currently processing of this channel? if (channels[i].reply == reply) { channels[i].reply = 0; + channels[i].request = QHttpNetworkRequest(); + channels[i].resendCurrent = false; if (!reply->isFinished() && !channels[i].alreadyPipelinedRequests.isEmpty()) { // the reply had to be prematurely removed, e.g. it was not finished diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 6a13669..ddc5d05 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -644,8 +644,10 @@ void QHttpNetworkConnectionChannel::allDone() // finished request. // Note that this may trigger a segfault at some other point. But then we can fix the underlying // problem. - if (!resendCurrent) + if (!resendCurrent) { + request = QHttpNetworkRequest(); reply = 0; + } // move next from pipeline to current request if (!alreadyPipelinedRequests.isEmpty()) { |