From 7c17c6ddbe12707795ea99b4f35df23cad576899 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 14 Feb 2016 14:18:31 +0100 Subject: print http2 frames to debug log --- libmproxy/protocol/http2.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libmproxy/protocol/http2.py') diff --git a/libmproxy/protocol/http2.py b/libmproxy/protocol/http2.py index 04ff8bf6..a65f7659 100644 --- a/libmproxy/protocol/http2.py +++ b/libmproxy/protocol/http2.py @@ -131,6 +131,12 @@ class Http2Layer(Layer): raise NotImplementedError() 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 is_server and event.stream_id % 2 == 1: eid = self.server_to_client_stream_ids[event.stream_id] -- cgit v1.2.3 From efcfc62b73ac484ed25727f476c7ad0bb25817d5 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sun, 14 Feb 2016 14:43:48 +0100 Subject: autopep8 --- libmproxy/protocol/http2.py | 1 - 1 file changed, 1 deletion(-) (limited to 'libmproxy/protocol/http2.py') diff --git a/libmproxy/protocol/http2.py b/libmproxy/protocol/http2.py index a65f7659..895fc9a8 100644 --- a/libmproxy/protocol/http2.py +++ b/libmproxy/protocol/http2.py @@ -234,7 +234,6 @@ class Http2Layer(Layer): stream.zombie = time.time() return - frame, _ = hyperframe.frame.Frame.parse_frame_header(raw_frame[:9]) if is_server: -- cgit v1.2.3 From 6746cf5f546bedd0486edd23d5253759920e1448 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sun, 14 Feb 2016 14:45:27 +0100 Subject: autoflake --- libmproxy/protocol/http2.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'libmproxy/protocol/http2.py') diff --git a/libmproxy/protocol/http2.py b/libmproxy/protocol/http2.py index 895fc9a8..c121637c 100644 --- a/libmproxy/protocol/http2.py +++ b/libmproxy/protocol/http2.py @@ -18,8 +18,6 @@ from .base import Layer from .http import _HttpTransmissionLayer, HttpLayer from .. import utils from ..models import HTTPRequest, HTTPResponse -from ..exceptions import HttpProtocolException -from ..exceptions import ProtocolException class SafeH2Connection(H2Connection): -- cgit v1.2.3