mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
CheckServerJob: Require status code 200. #2290
This commit is contained in:
parent
32fea6523f
commit
dfba8fbe5e
@ -430,7 +430,9 @@ bool CheckServerJob::finished()
|
||||
|
||||
bool success = false;
|
||||
QByteArray body = reply()->readAll();
|
||||
if( body.isEmpty() ) {
|
||||
int httpStatus = reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
|
||||
if( body.isEmpty() || httpStatus != 200) {
|
||||
qDebug() << "error: status.php replied " << httpStatus << body;
|
||||
emit instanceNotFound(reply());
|
||||
} else {
|
||||
QVariantMap status = QtJson::parse(QString::fromUtf8(body), success).toMap();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user