re-add server attribute to BaseHandler

This commit is contained in:
Maximilian Hils 2014-01-28 20:30:16 +01:00
parent 763cb90b66
commit e18ac4b672
2 changed files with 4 additions and 2 deletions

View File

@ -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))

View File

@ -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(