GitLab: Support unsecure http as well

Change-Id: Idfb4faf1cbfbfd6c2914b057e6c76461de0ceeff
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Stenger
2022-06-03 10:21:00 +02:00
parent 6674e5f267
commit fdb413c9a7
8 changed files with 36 additions and 16 deletions

View File

@@ -93,6 +93,8 @@ static std::pair<Error, QJsonObject> preHandleSingle(const QByteArray &json)
const QJsonDocument doc = QJsonDocument::fromJson(json, &error);
if (error.error != QJsonParseError::NoError) {
if (!json.isEmpty() && json.at(0) == '<') // we likely got an HTML response
result.code = 399;
result.message = error.errorString();
} else if (!doc.isObject()) {
result.message = "Not an Object";