Message24090
Logged In: YES
user_id=32974
wrt parse_multipart: this function just turns around and puts the output from
readline() into a list, as opposed to FieldStorage, which writes its chunked
output to a tempfile, so just adding an argument to readline within it would
not be useful. We'd only be able to fix the memory consumption issue in
parse_multipart if we were to make it also use a tempfile, but it's not clear
that *not* writing a tempfile isn't its expected behavior as the docs for
parse_multipart state:
Returns a dictionary just like parse_qs() keys are the field names, each
value is a list of values for that field. This is easy to use but not much
good if you are expecting megabytes to be uploaded -- in that case, use
the FieldStorage class instead which is much more flexible.
Is it OK to write a tempfile in this function (e.g. does that make it not useful
on stuff like embedded systems)?
If not, maybe we should just deprecate parse_multipart? I do find things that
use it if I google hard enough but there are only 187 hits when I google for
"cgi.parse_multipart" and 53,600 hits when I google for "cgi.FieldStorage".
I'm uploading another file with your style change suggestions. It bundles all
fixes to cgi.py, test_cgi.py, and test_cgi and includes the style changes, but
does nothing about parse_multipart. |
|
Date |
User |
Action |
Args |
2007-08-23 14:29:11 | admin | link | issue1112549 messages |
2007-08-23 14:29:11 | admin | create | |
|