Author draghuram
Recipients christian.heimes, draghuram, loewis, rtmq
Date 2007-11-12.21:42:33
SpamBayes Score 0.0358242
Marked as misclassified No
Message-id <1194903753.49.0.433934573857.issue1210@psf.upfronthosting.co.za>
In-reply-to
Content
Index: Lib/imaplib.py
===================================================================
--- Lib/imaplib.py      (revision 58956)
+++ Lib/imaplib.py      (working copy)
@@ -228,7 +228,7 @@
         self.port = port
         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         self.sock.connect((host, port))
-        self.file = self.sock.makefile('rb')
+        self.file = self.sock.makefile('r', encoding='ASCII', newline='')
 
 
     def read(self, size):

-------------

This patch fixes the issue but I am not entirely sure that it is
correct. I quickly looked at IMAP RFC and there does seem to be spec for
CHARSET in which case, that will have to be used instead of ASCII. It
requires more research and imap knowledge which I can't claim.

As for the tests, we need a imap server to connect to. Perhaps, google
wouldn't mind being used for this purpose?
History
Date User Action Args
2007-11-12 21:42:33draghuramsetspambayes_score: 0.0358242 -> 0.0358242
recipients: + draghuram, loewis, christian.heimes, rtmq
2007-11-12 21:42:33draghuramsetspambayes_score: 0.0358242 -> 0.0358242
messageid: <1194903753.49.0.433934573857.issue1210@psf.upfronthosting.co.za>
2007-11-12 21:42:33draghuramlinkissue1210 messages
2007-11-12 21:42:33draghuramcreate