diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-21 00:20:44 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-02-24 13:39:02 +0100 |
commit | 3e9125a3c13084f4abb0e5b74554909f24df9454 (patch) | |
tree | 924b6d81e14c24535aef662e3696c291d7370bc5 /pathod/protocols/http2.py | |
parent | d0d11cec7b479932668eb4e7c99d7824018d0460 (diff) | |
download | mitmproxy-3e9125a3c13084f4abb0e5b74554909f24df9454.tar.gz mitmproxy-3e9125a3c13084f4abb0e5b74554909f24df9454.tar.bz2 mitmproxy-3e9125a3c13084f4abb0e5b74554909f24df9454.zip |
nuke tcp.Address and add proper IPv6 support
Diffstat (limited to 'pathod/protocols/http2.py')
-rw-r--r-- | pathod/protocols/http2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pathod/protocols/http2.py b/pathod/protocols/http2.py index 628e3f33..7c88c5c7 100644 --- a/pathod/protocols/http2.py +++ b/pathod/protocols/http2.py @@ -172,9 +172,9 @@ class HTTP2StateProtocol: def assemble_request(self, request): assert isinstance(request, mitmproxy.net.http.request.Request) - authority = self.tcp_handler.sni if self.tcp_handler.sni else self.tcp_handler.address.host - if self.tcp_handler.address.port != 443: - authority += ":%d" % self.tcp_handler.address.port + authority = self.tcp_handler.sni if self.tcp_handler.sni else self.tcp_handler.address[0] + if self.tcp_handler.address[1] != 443: + authority += ":%d" % self.tcp_handler.address[1] headers = request.headers.copy() |