You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2004/02/03 16:56:19 UTC
ErrorDocument mime type
hi all
it's come up a few times for me (and other users) that string-type
ErrorDocuments and custom responses default to "text/html". however, lots
of people are using servers for xml-only content and want to be able to set
custom responses to simple xml strings without the overhead of a full
internal redirect. for example, anyway.
here is one way around the issue (if you agree that it's an issue :). the
attached patch:
- adds a new ErrorDocumentType directive, for setting the mime type of
string custom responses and ErrorDocuments
- removes the hard-coded charset previously set for all string-based errors
- respects AddDefaultCharset settings for both default (still "text/html")
and ErrorDocumentType-set types.
so, the big change is that, by default, simple strings no longer have a
charset sent with them unless the server is specifically configured that
way. regardless of the rest of the patch, it seems this ought to be the
default behavior anyway, but I guess it hasn't been an issue in the past.
anyway, just an idea. comments or other suggestions appreciated.
--Geoff