|
Fix by Barry Pearce - see the python-dev archives on GMane (sorry, the message has not been indexed by GMane yet) for an explanation of the fixes.
The fix has a bug - see http://www.modpython.org/pipermail/mod_python/2005-November/019468.html and the python-dev mailing list (GMane archive are not up to date, sorry).
Alexis Marrero <amarrero@mitre.org> has proposed a fix, inspired from what CherryPy does. I've added a few unit tests to the mix, with the help of Jim Gallacher who found a small file that could always break the file upload system. OK, this time I think the file upload problem is solved for good. I've
checked-in Alexis's code, with comments. Then I've done a quick rewrite of the multipart/form-data parser found in FieldStorage.__init__ and read_to_boundary so that it uses a regexp for the boundary checks, with the hope that it simplify the code a little bit (and remove thos nasty strip() calls). I've re-ran all tests and everything seems OK. |
||||||||||||||||||||||||||||||||||||||||||||||||||
http://www.modpython.org/pipermail/mod_python/2005-March/017754.html
and
http://www.modpython.org/pipermail/mod_python/2005-March/017756.html