PAC-D006 · uncompressed-large-pac

Large PAC served without compression

low · Delivery (HTTP headers)

A PAC of tens of kilobytes is fetched by every client on every refresh. Text compresses well; serving it gzip-encoded to the clients that ask for compression cuts the transfer without touching the file.

Why it matters

PAC bodies are repetitive text and compress by a factor of three or more. Browsers send Accept-Encoding: gzip on PAC fetches and accept compressed responses. For a large deployment the saving is bandwidth on the PAC server and faster start-up on slow links; compression does not fix the evaluation cost of a large file (PAC-P006), only its transfer. Compress only for clients that ask for it, which is what web servers do by default: in the lab (2026-10-11) Windows (WinHTTP) could not load a PAC that was sent gzip-compressed.

How to fix

Enable gzip (mod_deflate / gzip on) for application/x-ns-proxy-autoconfig responses, only for requests that send Accept-Encoding gzip (the web server default); never send the file compressed to a client that did not ask for it.

Examples

Bad

HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Content-Length: 84211
Open bad example in checker

Good

HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 19744
Open good example in checker

Engine behaviour

EngineBehaviourSource
winhttpA PAC sent gzip-compressed (Content-Encoding: gzip) failed to load.lab, verified 2026-10-11

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: