From 62c9c3db4f0c614b19359215e111dbd4fac237c4 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 27 Oct 2016 16:12:18 -0700 Subject: [PATCH] fix #1675 --- mitmproxy/connections.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mitmproxy/connections.py b/mitmproxy/connections.py index b565be781..143f576b9 100644 --- a/mitmproxy/connections.py +++ b/mitmproxy/connections.py @@ -104,7 +104,11 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject): def convert_to_ssl(self, *args, **kwargs): super().convert_to_ssl(*args, **kwargs) self.timestamp_ssl_setup = time.time() - self.sni = self.connection.get_servername() + sni = self.connection.get_servername() + if sni: + self.sni = sni.decode("idna") + else: + self.sni = None self.cipher_name = self.connection.get_cipher_name() self.tls_version = self.connection.get_protocol_version_name()