The QHttpEngine::Socket::readChannelFinished() signal is emitted twice if the following occurs:
The Content-Length header is set on the request, causing the signal to be emitted when requestDataRead is equal or greater than requestDataTotal (see here)
The physical transport (QTcpSocket) emits the readChannelFinished() signal, which is connected to QHttpEngine::Socket::readChannelFinished(), causing it to be emitted a second time (see here)
The correct behavior would be for the transport signal to be connected to a private slot that emits QHttpEngine::Socket::readChannelFinished()only ifrequestDataTotal is equal to -1.
The
QHttpEngine::Socket::readChannelFinished()
signal is emitted twice if the following occurs:The
Content-Length
header is set on the request, causing the signal to be emitted whenrequestDataRead
is equal or greater thanrequestDataTotal
(see here)The physical transport (
QTcpSocket
) emits thereadChannelFinished()
signal, which is connected toQHttpEngine::Socket::readChannelFinished()
, causing it to be emitted a second time (see here)The correct behavior would be for the transport signal to be connected to a private slot that emits
QHttpEngine::Socket::readChannelFinished()
only ifrequestDataTotal
is equal to -1.