This patch for Quixote-2.1/http_response.py changes the
HTTPResponse._encode_chunk method to only call the .encode method on
unciode objects, otherwise assume the programer knows what he does and
just send the byte string as is.
--
damjan | дамјан
This is my jabber ID --> [EMAIL PROTECTED] <-- not my mail address!!!
--- http_response.py-old 2005-08-21 16:53:11.000000000 +0200
+++ http_response.py 2005-08-21 16:50:40.000000000 +0200
@@ -220,10 +220,10 @@
def _encode_chunk(self, chunk):
"""(chunk : str | unicode) -> str
"""
- if self.charset == 'iso-8859-1' and isinstance(chunk, str):
- return chunk # non-ASCII chars are okay
- else:
+ if isinstance(chunk, unicode):
return chunk.encode(self.charset)
+ else:
+ return chunk # non-ASCII chars are okay
def _compress_body(self, body):
"""(body: str) -> str
_______________________________________________
Quixote-users mailing list
[EMAIL PROTECTED]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users