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

QNetworkAccessManager does not propagate proxy errors properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.8.0, 5.11.0
    • Fix Version/s: None
    • Component/s: Network, Network: Proxies
    • Labels:
      None
    • Environment:
      Windows 10, Qt 5.11.0 for MSVC2015 32-bit

      macOS 10.12, Qt 5.8.0

      Description

      If a proxy server can't be contacten when using QNetworkAccessManager, the error code from the HTTP engine is not being returned properly through QNetworkReply. Instead the error code is set to QNetworkReply::UnknownNetworkError or just QNetworkReply::HostNotFoundError.

      I've configured an HTTP proxy with QNetworkProxy::setApplicationProxy.

      If the proxy server returns connection refused, then the error code from QNetworkReply::error() is UnknownNetworkError. The errorString() says "Proxy connection refused" though.

      If the proxy server does not exist then error() returns HostNotFoundError which implies that the end host is not found rather than the proxy server. errorString() even says "Host <...> is not found", referencing the end server rather than the proxy server.

       

        Attachments

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

          Activity

            People

            • Assignee:
              cnn Qt Core & Network
              Reporter:
              hmoffatt Hamish Moffatt
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes