Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.8.0, 5.11.0
-
None
-
Windows 10, Qt 5.11.0 for MSVC2015 32-bit
macOS 10.12, Qt 5.8.0
-
-
69de333e1 (dev), 91132d6b2 (6.6), 2b59519bd (6.5)
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
For Gerrit Dashboard: QTBUG-68821 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
487423,5 | QNetworkReply: Propagate proxy errors properly | dev | qt/qtbase | Status: MERGED | +2 | 0 |
488112,2 | QNetworkReply: Propagate proxy errors properly | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
488113,2 | QNetworkReply: Propagate proxy errors properly | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |