Re: Patch[1] for http_response.py for quixote-2.1

Neil Schemenauer <[email protected]>
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
Hamish Lawson wrote:
> Neil Schemenauer wrote:
> 
> 
>>Changing DEFAULT_CHARSET has no effect on what is the default for
>>the HTTP protocol.
> 
> 
> That doesn't appear to be quite what http_response.py says. If a
> 'charset' parameter isn't provided to HTTPResponse's __init__ then
> Quixote will use DEFAULT_CHARSET for the response, unless this is
> overridden by a subsequent call to set_content_type.

What does that all have to do with the default for the HTTP *protocol*? 
  The default is iso-8859-1 and nothing Quixote does changes that.

> When 'charset' parameter isn't supplied I think a Quixote user might
> have expected the existing value of self.charset to be left unchanged
> rather than be reset behind the scenes:

I agree it is confusing (a number of people have stated it already). 
Here's the counter example:

	get_response().get_content_type('image/png')

In that case, I don't want Quixote to use the existing charset.

   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.