diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-08-24 16:52:32 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-08-24 16:52:32 +0200 |
commit | 622665952ca072a6276917c252758bbe19091a0d (patch) | |
tree | bb4bb3dff6b767319f00b4a7a31ac2ba7519ec5d /netlib | |
parent | cd9701050f58f90c757a34f7e4e6b5711700d649 (diff) | |
download | mitmproxy-622665952ca072a6276917c252758bbe19091a0d.tar.gz mitmproxy-622665952ca072a6276917c252758bbe19091a0d.tar.bz2 mitmproxy-622665952ca072a6276917c252758bbe19091a0d.zip |
minor stylistic fixes
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/http/http2/protocol.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/netlib/http/http2/protocol.py b/netlib/http/http2/protocol.py index e032c2a0..1d6e0168 100644 --- a/netlib/http/http2/protocol.py +++ b/netlib/http/http2/protocol.py @@ -123,6 +123,7 @@ class HTTP2Protocol(semantics.ProtocolMixin): timestamp_start, timestamp_end, ) + # FIXME: We should not do this. request.stream_id = stream_id return request @@ -150,7 +151,7 @@ class HTTP2Protocol(semantics.ProtocolMixin): if include_body: timestamp_end = time.time() - else: # pragma: no cover + else: timestamp_end = None response = http.Response( @@ -274,7 +275,7 @@ class HTTP2Protocol(semantics.ProtocolMixin): return True def _handle_unexpected_frame(self, frm): - if self.unhandled_frame_cb is not None: + if self.unhandled_frame_cb: self.unhandled_frame_cb(frm) def _receive_settings(self, hide=False): @@ -364,7 +365,9 @@ class HTTP2Protocol(semantics.ProtocolMixin): return [frm.to_bytes() for frm in frms] def _receive_transmission(self, stream_id=None, include_body=True): - # TODO: include_body is not respected + if not include_body: + raise NotImplementedError() + body_expected = True header_block_fragment = b'' |