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 Chromium removes from https URLs before calling the PAC.

Engine behaviour

EngineBehaviourSource
chromium >=52Path and query of https URLs are not visible to the PAC (since Chrome 52).doc, verified 2026-10-04 · ref

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