aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/pathod.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2016-07-07 09:48:22 +0200
committerGitHub <noreply@github.com>2016-07-07 09:48:22 +0200
commit64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9 (patch)
treebd1e5e6255f909d85e54d8a4e6f50aba6d0d2630 /pathod/pathod.py
parent605a4fd2fda2249ffeb4e34117910700e1a6353f (diff)
parent64a867973d5bac136c2e1c3c11c457d6b04d6649 (diff)
downloadmitmproxy-64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9.tar.gz
mitmproxy-64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9.tar.bz2
mitmproxy-64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9.zip
Merge pull request #1318 from mhils/tnetstring3-unicode-type
[tests actually pass] Add unicode to tnetstring3
Diffstat (limited to 'pathod/pathod.py')
-rw-r--r--pathod/pathod.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pathod/pathod.py b/pathod/pathod.py
index 3df86aae..7087cba6 100644
--- a/pathod/pathod.py
+++ b/pathod/pathod.py
@@ -89,7 +89,10 @@ class PathodHandler(tcp.BaseHandler):
self.http2_framedump = http2_framedump
def handle_sni(self, connection):
- self.sni = connection.get_servername()
+ sni = connection.get_servername()
+ if sni:
+ sni = sni.decode("idna")
+ self.sni = sni
def http_serve_crafted(self, crafted, logctx):
error, crafted = self.server.check_policy(