diff options
Diffstat (limited to 'src/network/kernel/qnetworkproxy_generic.cpp')
-rw-r--r-- | src/network/kernel/qnetworkproxy_generic.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/kernel/qnetworkproxy_generic.cpp b/src/network/kernel/qnetworkproxy_generic.cpp index 9069755da4..c576719076 100644 --- a/src/network/kernel/qnetworkproxy_generic.cpp +++ b/src/network/kernel/qnetworkproxy_generic.cpp @@ -55,7 +55,11 @@ QT_BEGIN_NAMESPACE static bool ignoreProxyFor(const QNetworkProxyQuery &query) { - const QList<QByteArray> noProxyTokens = qgetenv("no_proxy").split(','); + const QByteArray noProxy = qgetenv("no_proxy").trimmed(); + if (noProxy.isEmpty()) + return false; + + const QList<QByteArray> noProxyTokens = noProxy.split(','); foreach (const QByteArray &rawToken, noProxyTokens) { QByteArray token = rawToken.trimmed(); |