summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnectionchannel.cpp
diff options
context:
space:
mode:
authorMartin Petersson <Martin.Petersson@nokia.com>2012-03-26 11:49:55 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-02 16:56:48 +0200
commit967e9d6e285fbdffe52d026f1c81da071f50d68c (patch)
tree7ef17d57faae0ce5a23c62c4567ae2f44f8d6e18 /src/network/access/qhttpnetworkconnectionchannel.cpp
parent10b39adf34785239f6329d1054272a6b5a7390d3 (diff)
QNAM: close the channel if bytesAvailable and nothing piplined
If there are still bytesAvailable on the socket and we have nothing pipelined we should close the channel. This was not done before as the chunked decoder did not read the last CRLF. This has now been fixed so this close should be enabled again. Task-number: QTBUG-24875 Change-Id: I115b60f8d78bf1b83d3fd5887ab3eb9940b6bf00 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index d4931bd207..6e33836feb 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -733,14 +733,8 @@ void QHttpNetworkConnectionChannel::allDone()
}
} else if (alreadyPipelinedRequests.isEmpty() && socket->bytesAvailable() > 0) {
// this is weird. we had nothing pipelined but still bytes available. better close it.
- //if (socket->bytesAvailable() > 0)
- // close();
- //
- // FIXME
- // We do not close it anymore now, but should introduce this again after having fixed
- // the chunked decoder in QHttpNetworkReply to read the whitespace after the last chunk.
- // (Currently this is worked around by readStatus in the QHttpNetworkReply ignoring
- // leading whitespace.
+ close();
+
QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
} else if (alreadyPipelinedRequests.isEmpty()) {
if (connectionCloseEnabled)