Patch[1] for http_response.py for quixote-2.1
Damjan <[email protected]>
| Newsgroups | gmane.comp.web.quixote.user |
|---|---|
| Message-ID | <[email protected]> |
This patch for Quixote-2.1/http_response.py makes the HTTPResponse.set_content_type method more similar to HTTPResponse.__init__, in that it no longer assumes that iso-8859-1 is the default charset. Now it uses HTTPResponse.DEFAULT_CHARSET just like __init__ does! -- damjan | дамјан This is my jabber ID --> [email protected] <-- not my mail address!!! _______________________________________________ Quixote-users mailing list [email protected] http://mail.mems-exchange.org/mailman/listinfo/quixote-users
http_response-1.patch
(text/plain, 891 B)
--- http_response.py-old 2005-08-21 16:53:11.000000000 +0200
+++ http_response.py 2005-08-21 16:50:40.000000000 +0200
@@ -155,13 +155,13 @@
self.buffered = True
self.javascript_code = None
- def set_content_type(self, content_type, charset='iso-8859-1'):
- """(content_type : string, charset : string = 'iso-8859-1')
+ def set_content_type(self, content_type, charset=None):
+ """(content_type : string, charset : string = None)
Set the content type of the response to the MIME type specified by
- 'content_type'. Also sets the charset, defaulting to 'iso-8859-1'.
+ 'content_type'. Also sets the charset, defaulting to self.DEFAULT_CHARSET.
"""
- self.charset = charset
+ self.charset = charset or self.DEFAULT_CHARSET
self.content_type = content_type
def set_charset(self, charset):