diff --git a/pep-0042.txt b/pep-0042.txt index fb7d19ead..4305dbc34 100644 --- a/pep-0042.txt +++ b/pep-0042.txt @@ -139,6 +139,23 @@ Standard Library https://sourceforge.net/bugs/?func=detailbug&bug_id=110678&group_id=5470 + - cgi.py's FieldStorage class should be more conservative with + memory in the face of large binary file uploads. + + https://sourceforge.net/bugs/?func=detailbug&bug_id=110674&group_id=5470 + + There are two issues here: first, because + read_lines_to_outerboundary() uses readline() it is possible + that a large amount of data will be read into memory for a + binary file upload. This should probably look at the + Content-Type header of the section and do a chunked read if it's + a binary type. + + Second, because the lines that are read are stored in an + instance attribute (self.lines -- a list), the uploaded data is + never freed. self.lines isn't definied as part of the public + interface it /might/ be safe to remove it. OTOH, removing it + will break code clever and nosy code. Tools