mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-24 04:14:57 +08:00
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:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user