Re: behavior of set_content_type()

Neil Schemenauer <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
On Tue, Aug 30, 2005 at 11:01:15AM +0100, Hamish Lawson wrote:
> *If* Quixote is to adopt a policy of outputting a charset
> parameter only for text/* types, I think it would be better for
> this policy to be enforced in generate_headers instead,
> set_content_type not being the only way to change charset. But
> should Quixote adopt such a policy?

If I understand the HTTP specification, it should not.  The spec
says that text/* content types have a default charset of iso-8859-1
if 'charset' is not specified.  The 'charset' parameter may or may
not be specified for other types.

> But rather than Quixote trying to decide when to omit the charset
> parameter, I think the safer option would be to always include it
> in the response and leave it to the client to decide whether to
> use it.

If DEFAULT_CHARSET is utf-8 or utf-16, I think it would be
ridiculous for Quioxte to produce a Content-Type header that was
'image/png; charset=utf-16'.  That seems very broken to me, even if
the clients don't care.

  Neil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.