Message3220
| Author |
akuchling |
| Recipients |
| Date |
2001年02月18日.22:08:02 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Ah, I see; the traceback makes this much clearer. When you're uploading a file, everything in the form is sent as
a MIME document in the body; every field is accompanied by
a boundary separator and Content-Disposition header.
In multipart mode, cgi.py copies each field into a temporary file.
The first idea I had was to only use tempfiles for the actual upload field; unfortunately, that doesn't help because the upload field isn't special, and cgi.py has no way to know which it is ahead of time.
Possible second approach: measure the size of the resulting file; if it's less than some threshold (1K? 10K?), read its contents into memory and close the tempfile. This means only the largest fields will require that a file descriptor be kept open. I'll explore this more after beta1.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 13:53:03 | admin | link | issue231249 messages |
| 2007年08月23日 13:53:03 | admin | create |
|