Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61771

Default application proxy changed; now differs from documentation

XMLWordPrintable

    • 0d9f43d534983411e37a9f3912de272a4a6ced64 (qt/qtbase/5.13)

      The default application proxy returned by QNetworkProxy::applicationProxy();

      used to be of type QNetworkProxy::NoProxy.  However, it appears that somewhere between 5.7 and 5.9.1 this has changed.

      It's now returning QNetworkProxy::HttpProxy.

      Given this code:

      #include <QCoreApplication>
      #include <QNetworkAccessManager>
      #include <QNetworkProxy>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication a(argc, argv);
      
          QNetworkAccessManager man;
          QNetworkProxy proxy = man.proxy();
          qDebug () << proxy.type();
      
          QNetworkProxy appProxy = QNetworkProxy::applicationProxy();
          qDebug () << appProxy.type();
      
          return 0;//a.exec();
      }
      
      

      On 5.7 I get: 0 and 2 in the output.
      On 5.9.1 I get 0 and 3 in the output.

      This caused some of our connections to report "Host not found" because we had never explicitly set the proxy on the network access manager.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            leenam Leena Miettinen
            chardrazle Richard Hazlewood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes