Correct handing of IDNA encoding of internationalized domain names.

- Use IDNA encoding for hostnames gleaned by upstream-cert sniffing
- Use IDNA decoding for URL display in mitmproxy and mitmdump.
This commit is contained in:
Aldo Cortesi
2012-07-03 22:27:16 +12:00
parent ef986202ee
commit 9c30e2e86d
2 changed files with 3 additions and 3 deletions

View File

@@ -359,7 +359,7 @@ class Request(HTTPMsg):
"""
Returns a URL string, constructed from the Request's URL compnents.
"""
return utils.unparse_url(self.scheme, self.host, self.port, self.path)
return utils.unparse_url(self.scheme, self.host.decode("idna"), self.port, self.path)
def set_url(self, url):
"""