durusmail: quixote-users: Re: behavior of set_content_type()
Patch[1] for http_response.py for quixote-2.1
2005-08-21
2005-08-21
2005-08-29
2005-08-29
Re: Patch[1] for http_response.py for quixote-2.1
2005-08-29
2005-08-29
2005-09-01
behavior of set_content_type()
Re: behavior of set_content_type()
2005-08-30
2005-08-30
2005-08-30
Re: behavior of set_content_type()
Neil Schemenauer
2005-08-30
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
reply