September 16th, 2009, 12:39 AM
WinHttpGetProxyForUrl() not working as expected
With the below script in .pac file and all my application calls to URLs starting with "z" (via WinHttpGetProxyForUrl() ) are taking the DIRECT path. e.g, www.za.com, www.zb.com, ... goes DIRECT way. But with the same .pac file, Internet Explorer works as expected, i.e, with www.za.com and www.zb.com it goes the PROXY way.
funtion FindProxyForURL(url, host)
if (dnsDomainIs(host, "z"))
return "PROXY a.b.c.d";
I know the correct entry should be dnsDomainIs(host, "za.com") instead of dnsDomainIs(host, "z"). But when the IE is able to parse it the right way, why not WinHttpGetProxyUrl().
I couldn't find any readily available function equivalent to WinHttpGetProxyUrl(). Implementing WinHttpGetProxyUrl() ourselves will be a tedious task, as we have to parse close to twelve functions such as dnsDomainIs(). Please guide me accordingly.
September 16th, 2009, 11:47 PM
Re: WinHttpGetProxyForUrl() not working as expected
Above behavior found only in Windows XP. This was never reproducible on Vista and Windows 7.
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!