This is a migrated thread and some comments may be shown as answers.

Problem with PAC file

2 Answers 51 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Erez
Top achievements
Rank 1
Erez asked on 10 Mar 2015, 05:05 PM
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 Answers, 1 is accepted

Sort by
0
Erez
Top achievements
Rank 1
answered on 10 Mar 2015, 05:12 PM
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.
0
Eric Lawrence
Telerik team
answered on 10 Mar 2015, 08:48 PM
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.

 
Tags
Windows
Asked by
Erez
Top achievements
Rank 1
Answers by
Erez
Top achievements
Rank 1
Eric Lawrence
Telerik team
Share this question
or