[issue16042] smtplib: unlimited readline() from connection

A.M. Kuchling report at bugs.python.org
Sun Sep 15 18:31:57 CEST 2013


A.M. Kuchling added the comment:

Here's a final proposed version of the patch for 2.6 that adds a test.  Changes made:

* code now raises SMTPResponseException instead of a new SMTPLineTooLong exception; bwarsaw deemed that adding a new exception class was changing the module API.

* we looked at Serhiy's suggestion to move the length check into the 'while' loop's condition and decided not to -- the code is more obvious with the separate if/break.

* the test class is a cut-and-paste and slight modification of the BadHELOServerTests class; I didn't try to unify them in some way.

----------
Added file: http://bugs.python.org/file31773/smtplib-2.6-with-test.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16042>
_______________________________________


More information about the Python-bugs-list mailing list