http://bugs.winehq.org/show_bug.cgi?id=32438
--- Comment #2 from François Gouget fgouget@codeweavers.com 2012-12-13 19:42:52 CST --- I have tweaked my setup so I now have a local wpad DNS entry which is an alias (CNAME) for another hostname. This lets me snoop the traffic to that host from the Windows hosts.
* On Windows XP WinHttpDetectAutoProxyConfigUrl() does use the IP address in the URL it returns. But on Windows 8 it clearly converted the IP address back to a hostname because it's using the wrong CNAME.
* With my setup trying to download the wpad.dat file always results in a 404 error instead of failing with a 500 error only if the wrong hostname is used.
* This results in WinHttpGetProxyForUrl() returning ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT on both Windows XP and Windows 8. In Wine I still get ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT instead. -> Wine should check for errors when trying to download the configuration script.
* On Windows XP and Windows 8, WinHttpGetProxyForUrl() results in two download attempts: one with the HTTP Host field set to the IP address, and one with it set to 'wpad' (no domain name), both made with the 'Wine Regression Test' user agent.