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

QTcpServer::bind fails when an http proxy is set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.4.0, 5.5.0
    • Fix Version/s: None
    • Component/s: Network: Proxies
    • Labels:
      None
    • Environment:
      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

            Assignee:
            richmoore Richard Moore (qtnetwork)
            Reporter:
            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