From f32258e8f7eb2f4b43a704a003f00c32efbb898c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 26 Jun 2012 10:15:11 +1200 Subject: Port pathoc to new netlib API. Add SNI. --- libpathod/pathod.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libpathod/pathod.py') diff --git a/libpathod/pathod.py b/libpathod/pathod.py index db7f37f1..2ef3b0bf 100644 --- a/libpathod/pathod.py +++ b/libpathod/pathod.py @@ -7,6 +7,10 @@ class PathodError(Exception): pass class PathodHandler(tcp.BaseHandler): + sni = None + def handle_sni(self, connection): + self.sni = connection.get_servername() + def handle(self): if self.server.ssloptions: self.convert_to_ssl( @@ -50,6 +54,7 @@ class PathodHandler(tcp.BaseHandler): path = path, method = method, headers = headers.lst, + sni = self.sni, #remote_address = self.request.connection.address, #full_url = self.request.full_url(), #query = self.request.query, -- cgit v1.2.3