> Incidentally, one way I've considered implementing this is to simply > write the entire request body to a file, and parse it later, probably in > the context of whatever framework I'm using (but typical web frameworks > don't actually deal well with tracking an upload, hence a custom WSGI > application).
I put aside my rewrite of FieldStorage and went this route. I'm working on this using lighttpd and the flup wsgi implementation. When I do an upload though I'm seeing a delay before I start getting a progress read it seems like all the data is getting to the server and only then is environ['wsgi.input'] available. I'm looking at this just using a print statement in the loop I use to read in data. So when I upload a 10 MB file. It sits for about 2.5 minutes then bursts the progress read all at once in under a second. I need to investigate more may very well be me doing something silly. An aside on cgi.FieldStorage itself. It reads data using readline instead of reading in blocks of limited size. doing this I think means a file with very long lines, 20MB, 100MB, ... could cause excessive memory consumption. Kai _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
