aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-06-26 10:15:11 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-06-26 10:15:11 +1200
commitf32258e8f7eb2f4b43a704a003f00c32efbb898c (patch)
tree66cb3057f2092c893fef1c3c1d84f233462d213d /libpathod/pathod.py
parent8352c0278f468be30a9765a61f369ceb317aafe9 (diff)
downloadmitmproxy-f32258e8f7eb2f4b43a704a003f00c32efbb898c.tar.gz
mitmproxy-f32258e8f7eb2f4b43a704a003f00c32efbb898c.tar.bz2
mitmproxy-f32258e8f7eb2f4b43a704a003f00c32efbb898c.zip
Port pathoc to new netlib API. Add SNI.
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r--libpathod/pathod.py5
1 files changed, 5 insertions, 0 deletions
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,