Open jn0 opened 7 years ago
BTW, line # 483 in .readline()
method has also such an "unguarded" data
update which may persist forever if self.buffer
has no LF
...
Plus, it may be a good idea to
self.setDaemon(True)
in .__init__()
to get killed along with the main threadwith-as
syntax (i.e. add .__enter__()
and .__exit__()
methods)I'd like to call it as
with WSGIServer(...) as server:
server.start()
###
@jn0 As WSGIserver is a standalone fork of the CherryPy WSGI server, could it be possible for you to test it too ?
seems related to https://github.com/cherrypy/cherrypy/issues/1486
Yes, it looks the same. And needs almost the same patch.
@jn0 This is fixed in cherrypy/cheroot upstream. Please use cheroot of version v5.6.0
wsgiserver 1.3 in Python 2.7.12 under Ubuntu 16.04
Create the script
run it and call with
curl
. You'll see thatperforms just fine with POST method, but
will cause the app (and the whole box!) to hang until
alarm
just after sendingHTTP/1.1 100 Continue
response.If one comment out the
.read()
call, then normal operation resumes:Here we are.
I.e. it's the
.read()
method ofChunkedRFile
class fromwsgiserver.py
module.If the
size
parameter is not set, then it could set once theself.buffer
to something and loop forever eating all the RAM available (indata += self.buffer
).I think, the line # 457
should read somehow as
Yes, it works for me with this "patch".