diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-06-16 17:09:52 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-06-16 17:09:52 -0700 |
commit | 78785df16be237bfdbf4ee485639b61f06b4a47e (patch) | |
tree | 3c7eb0840227067e53c76628e6dcf3c02c2575a5 | |
parent | 2a0e8506153cf27544356eb6324a678ff4a147e9 (diff) | |
download | mitmproxy-78785df16be237bfdbf4ee485639b61f06b4a47e.tar.gz mitmproxy-78785df16be237bfdbf4ee485639b61f06b4a47e.tar.bz2 mitmproxy-78785df16be237bfdbf4ee485639b61f06b4a47e.zip |
pathoc: use idna encoding for hostnames
-rw-r--r-- | pathod/pathoc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pathod/pathoc.py b/pathod/pathoc.py index b539fec4..ea21b747 100644 --- a/pathod/pathoc.py +++ b/pathod/pathoc.py @@ -241,7 +241,7 @@ class Pathoc(tcp.TCPClient): def http_connect(self, connect_to): self.wfile.write( - b'CONNECT %s:%d HTTP/1.1\r\n' % (connect_to[0].encode(), connect_to[1]) + + b'CONNECT %s:%d HTTP/1.1\r\n' % (connect_to[0].encode("idna"), connect_to[1]) + b'\r\n' ) self.wfile.flush() |