summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-02-23 19:02:33 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-02-23 19:02:33 (GMT)
commit1219a8098965109a112a4732f8f3b78a00a68bae (patch)
tree4e26094971ab83b30ad1d5c4102aee3b840ddfb3
parent170482809864d7b5cd8c3e2584074e3e5de808c0 (diff)
downloadcpython-1219a8098965109a112a4732f8f3b78a00a68bae.zip
cpython-1219a8098965109a112a4732f8f3b78a00a68bae.tar.gz
cpython-1219a8098965109a112a4732f8f3b78a00a68bae.tar.bz2
#1389051: IMAP module tries to read entire message in one chunk. Patch by Fredrik Lundh.
-rw-r--r--Lib/imaplib.py2
1 files changed, 1 insertions, 1 deletions
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)