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 <thiago.macieira@intel.com>
This commit is contained in:
Shane Kearns 2012-02-22 20:20:27 +00:00 committed by Qt by Nokia
parent a7489b2ba3
commit 25c05ce3bb

View File

@ -417,6 +417,8 @@ QList<QNetworkProxy> 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);