Message3227
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? |
|
Date |
User |
Action |
Args |
2007-08-23 13:53:03 | admin | link | issue231249 messages |
2007-08-23 13:53:03 | admin | create | |
|