WinHttpGetProxyForUrl() not working as expected
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: WinHttpGetProxyForUrl() not working as expected

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    2

    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 "DIRECT";
    else
    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.

    Regards,
    Chandra

  2. #2
    Join Date
    Sep 2009
    Posts
    2

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center