Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94a6448

Browse files
committed
Merge: #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes.
2 parents 0a0d20e + 936da2a commit 94a6448

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Lib/imaplib.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@
4545

4646
# Maximal line length when calling readline(). This is to prevent
4747
# reading arbitrary length lines. RFC 3501 and 2060 (IMAP 4rev1)
48-
# don't specify a line length. RFC 2683 however suggests limiting client
49-
# command lines to 1000 octets and server command lines to 8000 octets.
50-
# We have selected 10000 for some extra margin and since that is supposedly
51-
# also what UW and Panda IMAP does.
52-
_MAXLINE = 10000
48+
# don't specify a line length. RFC 2683 suggests limiting client
49+
# command lines to 1000 octets and that servers should be prepared
50+
# to accept command lines up to 8000 octets, so we used to use 10K here.
51+
# In the modern world (eg: gmail) the response to, for example, a
52+
# search command can be quite large, so we now use 1M.
53+
_MAXLINE = 1000000
5354

5455

5556
# Commands

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Core and Builtins
2323
Library
2424
-------
2525

26+
- Issue #23647: Increase impalib's MAXLINE to accommodate modern mailbox sizes.
27+
2628
- Issue #23539: If body is None, http.client.HTTPConnection.request now sets
2729
Content-Length to 0 for PUT, POST, and PATCH headers to avoid 411 errors from
2830
some web servers.

0 commit comments

Comments
 (0)