Set a descriptive User Agent for requests, so sourceforge.net does not complain.
This commit is contained in:
parent
e462c3c8d8
commit
5e2ed69629
@ -155,6 +155,9 @@ void NetInstallPage::loadGroupList()
|
|||||||
request.setUrl( QUrl( confUrl ) );
|
request.setUrl( QUrl( confUrl ) );
|
||||||
// Follows all redirects except unsafe ones (https to http).
|
// Follows all redirects except unsafe ones (https to http).
|
||||||
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||||
|
// Not everybody likes the default User Agent used by this class (looking at you,
|
||||||
|
// sourceforge.net), so let's set a more descriptive one.
|
||||||
|
request.setRawHeader( "User-Agent", "Mozilla/5.0 (compatible; Calamares)" );
|
||||||
|
|
||||||
connect(&m_networkManager, &QNetworkAccessManager::finished,
|
connect(&m_networkManager, &QNetworkAccessManager::finished,
|
||||||
this, &NetInstallPage::dataIsHere);
|
this, &NetInstallPage::dataIsHere);
|
||||||
|
Loading…
Reference in New Issue
Block a user