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

Source: https://findproxyforurl.net/rules/wrong-content-type/ · last updated 2026-10-13

Rule PAC-D002 (`wrong-content-type`), severity low, category: Delivery (HTTP headers).

Chrome, Edge, Firefox and Windows load a PAC file whatever its Content-Type says. A wrong type does no harm on its own, but text/html or application/octet-stream often means the server answers with an error page or has no setting for the file.

## Why it matters

The historical type for PAC files is `application/x-ns-proxy-autoconfig`, and `.dat` files used
for WPAD should get the same type. The clients themselves do not check it: Chromium's source
says so explicitly, Firefox does not look at the type either, and in the lab Windows (WinHTTP)
loaded the file with no Content-Type at all, with `text/html` and with `application/javascript`.
So a wrong type is not why a PAC file fails to load.

It is still worth fixing, for two reasons. A generic type often comes with other
misconfiguration: `text/html` because the server answers with an error or login page instead of
the file, or `application/octet-stream` from a default web server mapping. And other programs
that read PAC files, such as security appliances or download tools, may treat an unexpected
type differently. Setting the type for `.pac` and `.dat` is a one-line server change and removes
a question from troubleshooting.


## How to fix

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

## Bad

```js
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 1234
```

## Good

```js
HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Cache-Control: max-age=3600
Content-Length: 1234
```

## Engine behaviour

- chromium: Content-Type is not enforced for PAC downloads; a type other than application/x-ns-proxy-autoconfig or application/x-javascript-config is only logged. (source: code, verified 2026-10-13)
- firefox: The PAC download does not check the Content-Type; only the HTTP status and the download result decide. (source: code, verified 2026-10-13)
- winhttp: The file loaded with no Content-Type header, with text/html and with application/javascript; the type is ignored. (source: lab, verified 2026-10-11)
