mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
re-add server attribute to BaseHandler
This commit is contained in:
parent
763cb90b66
commit
e18ac4b672
@ -297,9 +297,11 @@ class BaseHandler(SocketCloseMixin):
|
||||
"""
|
||||
rbufsize = -1
|
||||
wbufsize = -1
|
||||
def __init__(self, connection, address):
|
||||
|
||||
def __init__(self, connection, address, server):
|
||||
self.connection = connection
|
||||
self.address = Address.wrap(address)
|
||||
self.server = server
|
||||
self.rfile = Reader(self.connection.makefile('rb', self.rbufsize))
|
||||
self.wfile = Writer(self.connection.makefile('wb', self.wbufsize))
|
||||
|
||||
|
@ -50,7 +50,7 @@ class TServer(tcp.TCPServer):
|
||||
self.last_handler = None
|
||||
|
||||
def handle_client_connection(self, request, client_address):
|
||||
h = self.handler_klass(request, client_address)
|
||||
h = self.handler_klass(request, client_address, self)
|
||||
self.last_handler = h
|
||||
if self.ssl:
|
||||
cert = certutils.SSLCert.from_pem(
|
||||
|
Loading…
Reference in New Issue
Block a user