Problem with PAC file

3 posts, 0 answers
  1. Erez
    Erez avatar
    2 posts
    Member since:
    Mar 2015

    Posted 10 Mar 2015 Link to this post

    Hello,
    I have a proxy with PAC file via DHCP WPAD. Fiddler (v4.4.9.9 running on Windows 8.1) works well, except for a specific URL, "http://my.company.com/Tests/123456789ABCDEF.txt".
    This URL is specified in the PAC file, which is 
    function FindProxyForURL(url, host)
    {
            shExpMatch(url, "*://my.company.com/Support/*") ||
            shExpMatch(url, "*://my.company.com/MF/*")
        )
            return "DIRECT";
        else
        if (host=="www.company1.com" || host=="my.company.com" || host=="www.company3.com" || host=="www.company4.com" || host=="s3.amazonaws.com")
            return "PROXY 192.168.0.2:8888";
        else
     
            return "DIRECT";
    }

    Any idea what could cause it?

    Thanks!

    PS: original URLs modified but maintained characteristics.
  2. Erez
    Erez avatar
    2 posts
    Member since:
    Mar 2015

    Posted 10 Mar 2015 in reply to Erez Link to this post

    UPDATE:

    I think I solved the problem by re-saving the file with ANSI encoding instead of UTF-8. I can provide the files in private channel if it helps.
  3. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 10 Mar 2015 Link to this post

    Hi, Erez--

    Fiddler relies upon WinHTTP to parse and run the proxy script. It's entirely possible that WinHTTP doesn't like a UTF-8 BOM (three bytes at the top of the file) and that would cause it not to work. But that's unfortunately a question for Microsoft, as I no longer have access to their source code...

    Regards,
    Eric Lawrence
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top