Wim Heirman
Wim.Heirman at UGent.be
Tue Oct 18 07:02:53 EDT 2005
Hello, When uploading a large file without newlines (a testfile with 100 MB of \0-bytes), I found that Apache starts to consume a huge amount of memory. The problem is the two req.readline()-calls in util.py:read_to_boundary(); since the file doesn't have a newline in it the first one will return a string of size 100 MB. Replacing both calls with req.readline(4096) solves this, the rest of the code in read_to_boundary() seems to work fine when reading lines in multiple calls. Regards, Wim. -- ir. Wim Heirman, ELIS Department, Ghent University, Belgium Phone: +32-9-264.95.27 E-mail: wim.heirman at elis.UGent.be http://www.elis.UGent.be/~wheirman/
|