Merge pull request #933 from mitmproxy/http2-log
Print HTTP2 frames to debug log
This commit is contained in:
commit
c394ee31fb
|
@ -131,6 +131,12 @@ class Http2Layer(Layer):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def _handle_event(self, event, source_conn, other_conn, is_server):
|
def _handle_event(self, event, source_conn, other_conn, is_server):
|
||||||
|
self.log(
|
||||||
|
"HTTP2 Event from {}".format("server" if is_server else "client"),
|
||||||
|
"debug",
|
||||||
|
[repr(event)]
|
||||||
|
)
|
||||||
|
|
||||||
if hasattr(event, 'stream_id'):
|
if hasattr(event, 'stream_id'):
|
||||||
if is_server and event.stream_id % 2 == 1:
|
if is_server and event.stream_id % 2 == 1:
|
||||||
eid = self.server_to_client_stream_ids[event.stream_id]
|
eid = self.server_to_client_stream_ids[event.stream_id]
|
||||||
|
|
Loading…
Reference in New Issue