an indian in a pocket
MiniApache (via) is a lightweight webserver in the same vein as lighttpd.
On the plus side, a minuscule config file (4 KB) and a purportedly light footprint.
On the minus side, the config file includes AddDefaultCharset iso-8859-1 (vewy bad), and it only runs on Windows NT/2k/XP systems.
4 responses
Please explain why “AddDefaultCharset iso-8859-1″ is very bad practise.
Thanks,
James
#1 James Greenwood — 2005/03/08 at 8:17
James, it is very bad practice because documents have to send their own charset headers to override Apache’s. That is not possible with static files, even HTML or XML ones that use a charset meta tag or charset argument in the XML declaration, because browsers give absolute priority to the charset specified in HTTP headers.
This is a very annoying directive, and I’ve seen multiple people get bitten by its presence. Some thought they were editing UTF-8 documents, but they were actually editing ISO-8859-1 documents. Or their dynamic pages specified a charset, but the forms were handled as ISO-8859-1. This caused so many headaches over the past years…
See also: AddDefaultCharset considered harmful, a bug filed by the W3C itself that eventually lead to the removal of the directive in Apache2.1′s default config.
#2 michel v — 2005/03/08 at 12:32
Hi Michel,
Thanks for the tip. It is now commented out on both of the versions (with and without PHP). Plus, I’ve fixed the bugs and contact forms so they work now.
Thanks again,
James
#3 James Greenwood — 2005/03/18 at 18:59
You’re welcome.
Actually I’m sorry that I didn’t just contact you about it before I’d post about it on my blog.
#4 michel v — 2005/03/20 at 19:03
Your words