twisted.web's wsgi.input fails on large or multipart posts

[email protected] Mon, 16 Nov 2009 17:23:10 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from rikyu <[email protected]>:

Anytime a request uses a tempfile.TemporaryFile to hold the request body (instead of a StringIO), twisted.web's WSGI _InputStream fails  on readline(), since the tempfile doesn't accept None as an argument to readline().

This appears to happen as a result of a multipart/form-data encoded POST request, and potentially also during any large (> 130000 bytes) requests of any method.

Attached patches for wsgi.py and test_wsgi.py.

----------
Type     : defect
Component: web
Keywords : 
Priority : high
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4113