Re: Re: behavior of set_content_type()

David Binger <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
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')
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.