HTTP internals: do not access reply that was deleted already
... rather than crashing. Task-number: QTBUG-32404 Change-Id: Ia2f938394fb451459564ef5966419f952b3e2d0e Reviewed-by: Richard J. Moore <rich@kde.org>bb10
parent
3f95ae8e2f
commit
78f9f4b497
|
|
@ -1116,6 +1116,9 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
|
|||
errorCode = QNetworkReply::RemoteHostClosedError;
|
||||
}
|
||||
} else if (state == QHttpNetworkConnectionChannel::ReadingState) {
|
||||
if (!reply)
|
||||
break;
|
||||
|
||||
if (!reply->d_func()->expectContent()) {
|
||||
// No content expected, this is a valid way to have the connection closed by the server
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue