diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-06-14 19:17:34 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-06-14 19:43:32 +0200 |
commit | 8d71a5b4aba8248b97918b11b12275bbf5197337 (patch) | |
tree | 80951c07e56dc07e2a840cd5dbe85ed6d83f21a1 /netlib/http2/protocol.py | |
parent | 9c6d237d02290c2388f19ec8f215827d4f921e4b (diff) | |
download | mitmproxy-8d71a5b4aba8248b97918b11b12275bbf5197337.tar.gz mitmproxy-8d71a5b4aba8248b97918b11b12275bbf5197337.tar.bz2 mitmproxy-8d71a5b4aba8248b97918b11b12275bbf5197337.zip |
http2: add authority header
Diffstat (limited to 'netlib/http2/protocol.py')
-rw-r--r-- | netlib/http2/protocol.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/netlib/http2/protocol.py b/netlib/http2/protocol.py index 56aee490..1e722dfb 100644 --- a/netlib/http2/protocol.py +++ b/netlib/http2/protocol.py @@ -152,10 +152,13 @@ class HTTP2Protocol(object): if headers is None: headers = [] + authority = self.tcp_handler.sni if self.tcp_handler.sni else self.tcp_handler.address.host headers = [ (b':method', bytes(method)), (b':path', bytes(path)), - (b':scheme', b'https')] + headers + (b':scheme', b'https'), + (b':authority', authority), + ] + headers stream_id = self.next_stream_id() @@ -192,6 +195,7 @@ class HTTP2Protocol(object): body += frm.payload if frm.flags & frame.Frame.FLAG_END_STREAM: break + # TODO: implement window update & flow headers = {} for header, value in self.decoder.decode(header_block_fragment): |