From 1219a8098965109a112a4732f8f3b78a00a68bae Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 23 Feb 2008 19:02:33 +0000 Subject: #1389051: IMAP module tries to read entire message in one chunk. Patch by Fredrik Lundh. --- Lib/imaplib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/imaplib.py b/Lib/imaplib.py index c05abb4..7807e8f 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -1156,7 +1156,7 @@ else: chunks = [] read = 0 while read < size: - data = self.sslobj.read(size-read) + data = self.sslobj.read(min(size-read, 16384)) read += len(data) chunks.append(data) -- cgit v0.12