Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Installer Framework creates 'blacklisted' QNetworkRequests
Forum Updated to NodeBB v4.3 + New Features

Installer Framework creates 'blacklisted' QNetworkRequests

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 3 Posters 553 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MattR
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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");
      

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • T Offline
        T Offline
        Tim.Jenssen
        wrote on last edited by
        #3

        See https://bugreports.qt.io/browse/QTIFW-671 and vote and comment there.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved