zengun

weblog

20050221

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

  1. Please explain why “AddDefaultCharset iso-8859-1″ is very bad practise.

    Thanks,

    James

    #1 James Greenwood2005/03/08 at 8:17

  2. 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

  3. 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 Greenwood2005/03/18 at 18:59

  4. 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


Required fields:
Are marked by this sign: *
XHTML:
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
On comment spam/irrelevance:
Your comment may be moderated or considered as spam by the leprechauns running this server. If you get a 412 error or a mean message, it may be that they thought it was spam: try wording the comment differently or remind me to put up a contact form so you can warn me about the problem.
Of course, once the leprechauns are done doing their magic, I reserve the right to delete any comment for any reason.