From: Shane Kearns Date: Wed, 22 Feb 2012 20:20:27 +0000 (+0000) Subject: Windows - handle proxy autoconfiguration resulting in no proxy X-Git-Tag: qt-v5.0.0-alpha1~480 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25c05ce3bb8b53ed937363492b8222ee3b83d749;p=profile%2Fivi%2Fqtbase.git Windows - handle proxy autoconfiguration resulting in no proxy The PAC file may result in direct connection, in which case WinHttp returns null strings for the proxies and the connection type marked as direct. In this case, return the default list (no proxy) Change-Id: I601033f56a841bb92ea80a28174bb993b024ad79 Reviewed-by: Thiago Macieira --- diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp index 37c0cc4..324f3cc 100644 --- a/src/network/kernel/qnetworkproxy_win.cpp +++ b/src/network/kernel/qnetworkproxy_win.cpp @@ -417,6 +417,8 @@ QList QNetworkProxyFactory::systemProxyForQuery(const QNetworkPro if (proxyInfo.lpszProxyBypass) GlobalFree(proxyInfo.lpszProxyBypass); + if (proxyInfo.dwAccessType == WINHTTP_ACCESS_TYPE_NO_PROXY) + return sp->defaultResult; //i.e. the PAC file result was "DIRECT" if (isBypassed(query.peerHostName(), splitSpaceSemicolon(proxyBypass))) return sp->defaultResult; return parseServerList(query, proxyServerList);