Lighttpd: remove charset=UTF-8 from content type

httphttp-headerslighttpd

lighttpd 1.4.31-4+deb7u3 automatically adds ;charset=UTF-8 to the content-type of .html and .php files.

How can I remove that?


Setting the content type in PHP itself does not help; lighttpd still adds the charset parameter – as soon as the mime type begins with text/.

Removing

 include_shell "/usr/share/lighttpd/create-mime.assign.pl"

from my config does also not help.

Best Answer

Lighttpd doesn't touch the Content-Type returned by a backend.

The charset is already set by php, see ini.default-charset