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

QTcpServer::bind fails when an http proxy is set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.4.0, 5.5.0
    • Network: Proxies
    • None
    • Linux

    Description

      When http_proxy is set to "http://someproxy", and the application calls QNetworkProxyFactory::setUseSystemConfiguration(true), QTcpServer::bind() fails.

      QNativeSocketEnginePrivate::checkProxy fails since server->proxy() is QNetworkProxy::DefaultProxy, and QNetworkProxy::applicationProxy() returns a proxy for QNetworkProxyQuery::TcpSocket and not TcpServer.

      I think there is no need to check the proxy for QTcpServer, since QTcpServer::listen calls QAbstractSocketEngine::createSocketEngine, which only creates a QNativeSocketEngine when the resolved proxy is QNetworkProxy::NoProxy.

      Attachments

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

        Activity

          People

            richmoore Richard Moore (qtnetwork)
            loic.yhuel Loïc Yhuel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes