Installer Framework creates 'blacklisted' QNetworkRequests
-
The Installer Framework creates QNetworkRequests with the default User-Agent of "Mozilla/5.0". See example here.
On many web hosts, this User-Agent value triggers Mod Security rule 900095: "Bad UA :: Fake Mozilla Agent", which causes the download to fail.
The solution is to set the User-Agent header to any other value. Is this a known issue? Are there any workarounds?
-
Hi and welcome to devnet,
Did you already checked the bug report system for something similar ?
One thing that could be done but requires modification of the installer framework would be to manually set the user agent like:
QNetworkRequest request; request.setUrl(url); request.setRawHeader("User-Agent", "MyInstaller 1.0"); -
See https://bugreports.qt.io/browse/QTIFW-671 and vote and comment there.