[Web-SIG] environ["wsgi.input"].read()

Brian Smith brian at briansmith.org
Mon Jan 28 13:39:51 CET 2008


Andrew Clover wrote:
> Manlio Perillo wrote:
> > what about "requiring" that a WSGI implementation calls the WSGI 
> > application only when all the request body has been read?
> 
> Regardless of the discussed technical issues, 'no thanks' - 
> this would make it impossible to write - to choose an example 
> from production code
> - a large-file-upload handler that allows upload progress to 
> be checked during the process.

This is already impossible to do *portably* with WSGI, because PEP 333
already allows the gateway to cache the request body at its own
discretion. The last time I checked, Lighttpd and nginx both cached the
entire request body before handing it off to back end [Fast|S]CGI
processes. Most web accelerator proxies work the same way.

I do agree that it should not be *required* behavior, but it should be
*allowed* behavior.

- Brian



More information about the Web-SIG mailing list