Content-Type is not application/x-ns-proxy-autoconfig
medium
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 checkerGood
HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Cache-Control: max-age=3600
Content-Length: 1234
Open good example in checkerEngine behaviour
| Engine | Behaviour | Source |
|---|---|---|
| chromium | Content-Type is not enforced for PAC fetches (the body is used as script). | expert, unverified |
Related rules
- PAC URL does not return 200 PAC-D010
- No Cache-Control header on the PAC response PAC-D003