summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Petersson <Martin.Petersson@nokia.com>2012-04-10 12:17:17 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-04-10 14:57:31 (GMT)
commit4317fcda50bb91ef86d51114b07047c634ebc7a5 (patch)
treed0d41d6d95081b560f395321436bbee453d4d858
parent57a642a7ce98a56fbd7ee983b251e7ed1e220366 (diff)
downloadQt-4317fcda50bb91ef86d51114b07047c634ebc7a5.zip
Qt-4317fcda50bb91ef86d51114b07047c634ebc7a5.tar.gz
Qt-4317fcda50bb91ef86d51114b07047c634ebc7a5.tar.bz2
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: I2ebdce1094282b055f4fd72ca642887c5f96c43b Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
-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 e198218..ff6f8a0 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -761,14 +761,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)