A home-made PAC test page has two boxes labelled Host and URL. The button passes their values in that order. Unfortunately, the PAC function expects the opposite order.

FindProxyForURL(url, host)

For one illustrative destination, the call should look like:

FindProxyForURL("https://status.office.example/", "status.office.example")

The second argument is a hostname, without the scheme, path or port. A rule comparing host to a known name will not match when the test harness supplies a complete URL there.

Both inputs are strings, so JavaScript need not throw an error. The script can quietly reach its final return and display a plausible-looking proxy. That makes this bug especially easy to mistake for a bad domain rule.

Check the call before the rule

Read the function invocation in the test harness and inspect the two values at that boundary. Then compare a known exact-host exception with an unrelated host that should use the default route. Do not start by broadening the exception until it matches the malformed input.

A corrected call still leaves the evaluator's helper environment to consider. A fixed myIpAddress() or a missing DNS helper is not the browser's real network state. Keep those as separate questions. The immediate repair is the parameter contract; the next repair, if needed, is making the test environment represent the intended consumer.

Mikanda mikatakata