durusmail: quixote-users: Re: Patch[1] for http_response.py for quixote-2.1
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: Patch[1] for http_response.py for quixote-2.1
Neil Schemenauer
2005-08-29
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
reply