PAC-D002 · wrong-content-type

Content-Type is not application/x-ns-proxy-autoconfig

medium · Delivery (HTTP headers)

Browsers mostly ignore the Content-Type of a PAC, but not all consumers do, and application/octet-stream or text/html responses (typically an error page or a download prompt) are a sign the server is not configured for the file.

Why it matters

The historical type application/x-ns-proxy-autoconfig is what every PAC-related document and tool expects. Some clients are reported to be strict about it, and a generic type often comes with other misconfiguration: a captive-portal or error page served with 200, text/html because the file is missing, or application/octet-stream from a default web server mapping. Setting the type explicitly for .pac and .dat is a one-line server change and removes a variable from troubleshooting.

How to fix

Map .pac and .dat to application/x-ns-proxy-autoconfig on the web server (Apache AddType; nginx types block).

Examples

Bad

HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 1234
Open bad example in checker

Good

HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Cache-Control: max-age=3600
Content-Length: 1234
Open good example in checker

Engine behaviour

EngineBehaviourSource
chromiumContent-Type is not enforced for PAC fetches (the body is used as script).expert, unverified

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