This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kbk
Recipients
Date 2001-04-13.04:04:48
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=149084

The patch posted 11 Apr is a neat and compact solution! 

The only thing I can imagine would be a problem would be if a form had a large number of (small) fields 
which set the content-length attribute.  I don't have an example of such, though. Text fields perhaps? If 
that was a realistic problem, a solution might be for make_file() to maintain a pool of temporary files; if the 
field (binary or not) turned out to be small a StringIO could be created and the temporary file returned to 
the pool.

There are a couple of things I've been thinking about in cgi.py; the patch doesn't seem to change the 
situation one way or the other:

There doesn't seem to be any RFC requirement that a file upload be accompanied by a content-length 
attribute, regardless of whether it is binary or ascii. In fact, some of the RFC examples I've seen omit it. If 
content-length is not specified, the upload will be processed by file.readline(). Can this cause problems for 
arbitrary binary files?
History
Date User Action Args
2007-08-23 13:53:03adminlinkissue231249 messages
2007-08-23 13:53:03admincreate