#966: environ["wsgi.input"] may hang indefinitely if read()
------------------------------------------+-------------------------------- -
Reporter: tuure.laurino...@indagon.com | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone:
Component: wsgiserver | Resolution:
Keywords: |
------------------------------------------+-------------------------------- -
Comment (by Graham.Dumple...@gmail.com):
The reason it blocks is because for the version of CherryPy WSGI server
being used there is no end sentinel of an empty string being returned when
all content as specified by Content-Length has been read. That CherryPy
does this is its right within WSGI 1.0 because an end sentinel is not
mandatory.
You will find that CherryPy WSGI server in either repository trunk or
branch (not sure which) behaves differently and will return an empty
string when content as specified by Content-Length is exhausted. This is
because that latter version is implementing guarantees proposed as later
revision of WSGI specification and as I describe in
'http://blog.dscpl.com.au/2009/10/details-on-
wsgi-10-amendmentsclarificat.html'.
The Apache/mod_wsgi module has always provided those guarantees but since
was outside of scope of WSGI 1.0 specification, technically a WSGI 1.0
compliant application couldn't rely on them. The intent is that WSGI 1.1
make those guarantees and clarifications. There has though be no mandate
from Python WEB-SIG to agree to that though, so CherryPy and mod_wsgi are
getting out on a limb and doing it anyway as far as saying they implement
WSGI 1.1.
--
Ticket URL: <http://www.cherrypy.org/ticket/966>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework