#1389051: IMAP module tries to read entire message in one chunk. Patch by Fredrik Lundh.
This commit is contained in:
parent
31679397af
commit
37d4f7bc0c
|
@ -1147,7 +1147,7 @@ class IMAP4_SSL(IMAP4):
|
||||||
chunks = []
|
chunks = []
|
||||||
read = 0
|
read = 0
|
||||||
while read < size:
|
while read < size:
|
||||||
data = self.sslobj.read(size-read)
|
data = self.sslobj.read(min(size-read, 16384))
|
||||||
read += len(data)
|
read += len(data)
|
||||||
chunks.append(data)
|
chunks.append(data)
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,9 @@ Core and builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Bug #1389051: imaplib causes excessive memory fragmentation when reading
|
||||||
|
large messages.
|
||||||
|
|
||||||
- Bug #1433694: minidom's .normalize() failed to set .nextSibling for
|
- Bug #1433694: minidom's .normalize() failed to set .nextSibling for
|
||||||
last child element.
|
last child element.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue