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>
This commit is contained in:
parent
10b39adf34
commit
967e9d6e28
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user