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()
David Binger
2005-08-30
On Aug 30, 2005, at 6:01 AM, Hamish Lawson wrote:

> Neil Schemenauer wrote:
>
>
>>         if charset is not None or not content_type.startswith
>> ('text/'):
>>             self.charset = charset
>>
>
> This code is deciding two things: whether the user asked for charset
> to be changed, and whether they are allowed this change. I think it
> would be better if it just did the first.

I agree that this would be clearer:  the downside being
that publisher.set_content_type('image/png') would not
change the charset (as Neil wants).

> *If* Quixote is to adopt a
> policy of outputting a charset parameter only for text/* types,

This change to set_content_type doesn't create that policy.
You can still
publisher.set_content_type('image/svg', 'utf-8')




reply