PAC-K012 · engine-divergent-result

Engines return different results for the same URL

info · Compatibility across engines

The same test URL produced different proxy decisions under different engine profiles (for example because Chromium strips the path from https URLs, or because an engine lacks a helper). The PAC's behaviour depends on which client runs it.

Why it matters

Most divergences trace back to a specific rule in this catalogue: URL path matching on https (PAC-C001), case handling (PAC-K009), Ex functions (PAC-K003), ES level (PAC-K001), unported proxies (PAC-X013). This finding reports the observed effect so that the author can see which URLs are affected and which engines disagree. A PAC that behaves identically on all target engines is one of the conditions for A+.

How to fix

Follow the specific finding named in the message; the divergence disappears when the engine-dependent construct is removed.

Examples

Bad

function FindProxyForURL(url, host) {
  if (shExpMatch(url, "*/intranet/*")) {
    return "DIRECT";
  }
  return "PROXY proxy.corp.example:8080";
}
Open bad example in checker

Good

function FindProxyForURL(url, host) {
  if (host == "intranet.corp.example") {
    return "DIRECT";
  }
  return "PROXY proxy.corp.example:8080";
}
Open good example in checker

The bad example matches the path, which Chrome removes from https URLs and Firefox removes from all URLs before calling the PAC.

Engine behaviour

EngineBehaviourSource
chromium >=52Path and query of https URLs are not visible to the PAC (since Chrome 52); a user name and password are removed for every scheme.lab, verified 2026-10-12
firefoxPath and query are not visible to the PAC for any scheme; a user name and password before the host are visible.lab, verified 2026-10-12

Source: code = read in the engine's source, doc = vendor documentation, lab = observed in a lab run, expert = practitioner knowledge, not yet verified.

Related rules

References

Last updated: