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
Damjan
2005-08-29
> Please review the attached patch.  It changes the default charset
> for set_content_type() to None.  If HTTPResponse.charset is None
> then the charset parameter of the Content-Type header will not be
> specified.  If you think it is less surprising, we can make the
> 'charset' argument to set_content_type() a required parameter.

What patch are you talking about?
My patch would set the charset to http_response.DEFAULT_CHARSET
if it's not specified in the set_content_type call.
see this line:
        self.charset = charset or self.DEFAULT_CHARSET
maybe I should've expaneded it:

        if charset:
                self.charset = charset
        else:
                self.charset = self.DEFAULT_CHARSET

What's wrong with that? self.charset will never be 'None' unless you
also set http_response.DEFAULT_CHARSET to None.

--
damjan | дамјан
This is my jabber ID --> damjan@bagra.net.mk <-- not my mail address!!!
reply