mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
adapt pathod to netlib changes
This commit is contained in:
parent
e9a838ae53
commit
6114f07f76
@ -185,8 +185,8 @@ class PathodHandler(tcp.BaseHandler):
|
|||||||
return False, dict(type="error", msg="Access denied: web interface disabled")
|
return False, dict(type="error", msg="Access denied: web interface disabled")
|
||||||
else:
|
else:
|
||||||
self.info("app: %s %s" % (method, path))
|
self.info("app: %s %s" % (method, path))
|
||||||
cc = wsgi.ClientConn(self.address())
|
req = wsgi.Request("http", method, path, headers, content)
|
||||||
req = wsgi.Request(cc, "http", method, path, headers, content)
|
flow = wsgi.Flow(self.address, req)
|
||||||
sn = self.connection.getsockname()
|
sn = self.connection.getsockname()
|
||||||
a = wsgi.WSGIAdaptor(
|
a = wsgi.WSGIAdaptor(
|
||||||
self.server.app,
|
self.server.app,
|
||||||
@ -194,7 +194,7 @@ class PathodHandler(tcp.BaseHandler):
|
|||||||
self.server.address.port,
|
self.server.address.port,
|
||||||
version.NAMEVERSION
|
version.NAMEVERSION
|
||||||
)
|
)
|
||||||
a.serve(req, self.wfile)
|
a.serve(flow, self.wfile)
|
||||||
return True, None
|
return True, None
|
||||||
|
|
||||||
def _log_bytes(self, header, data, hexdump):
|
def _log_bytes(self, header, data, hexdump):
|
||||||
|
Loading…
Reference in New Issue
Block a user