Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions maia/maiaXmlRpcClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ void MaiaXmlRpcClient::setUrl(QUrl url) {
return;

request.setUrl(url);

const QString userInfo = request.url().userInfo(QUrl::FullyEncoded);
QByteArray auth;
if (!userInfo.isEmpty()) {
// Work around QTBUG-114119
// "QNetworkAccessManager only tries to authenticate if the server responds with 401"
auth = "Basic " + userInfo.toUtf8().toBase64();
}
request.setRawHeader("Authorization", auth);
}

void MaiaXmlRpcClient::setUserAgent(QString userAgent) {
Expand Down