mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Fixed the WSGI server hang in netlib, remove fudge.
This commit is contained in:
parent
15aab74ddb
commit
33be5a72bf
@ -7,6 +7,7 @@ class PathodError(Exception): pass
|
||||
|
||||
|
||||
class PathodHandler(tcp.BaseHandler):
|
||||
wbufsize = 0
|
||||
sni = None
|
||||
def handle_sni(self, connection):
|
||||
self.sni = connection.get_servername()
|
||||
@ -77,11 +78,7 @@ class PathodHandler(tcp.BaseHandler):
|
||||
version.NAMEVERSION
|
||||
)
|
||||
app.serve(req, self.wfile)
|
||||
# FIXME: Tear down the connection. We have some problem with
|
||||
# connection termination that causes some clients (e.g. Chrome)
|
||||
# to hang. It appears to be related to responses that have no
|
||||
# Content-Length header.
|
||||
self.finish()
|
||||
logging.debug("%s: wsgi %s %s"%(self.client_address, method, path))
|
||||
|
||||
|
||||
class Pathod(tcp.TCPServer):
|
||||
|
@ -81,4 +81,3 @@ class TestDaemon:
|
||||
def test_anchor(self):
|
||||
rsp = self.getpath("anchor/foo")
|
||||
assert rsp.status_code == 202
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user