Martin Panter added the comment:

The first offending message I found is number 183465:

>>> s.group("comp.lang.python")
('211 4329 179178 183507 comp.lang.python', 4329, 179178, 183507, 
'comp.lang.python')
>>> s._putcmd("OVER 183465")
>>> s._getresp()
'224 Overview information for 183465 follows'
>>> line = s.file.readline()
>>> len(line)
2702
>>> [number, subject, from_header, date, message_id, references, bytes, lines, 
>>> extra] = line.split(b"\t", 8)
>>> message_id
b'<mailman.122.1481898601.2322.python-l...@python.org>'
>>> len(references)
2483
>>> len(references.split())
36

Assuming the References value is the only large field in an OVER response line, 
I would guess that a reasonable limit per line might be

200 bytes/message-id * 200 messages/thread = 40,000 bytes per OVER line

I agree with closing the session whenever the client’s protocol state is 
broken, but only for a different, tangential reason. See Issue 22350. Even if 
you raised an explicit exception when using a closed session, like in 
nntplib_maxbytes.patch, won’t that still cause the subsequent tests to fail? I 
think the best solution is to stop sharing one connection across multiple 
tests: Issue 19756.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28971>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to