September 15th, 2009, 11:39 PM
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.
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!