mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
minor stylistic fixes
This commit is contained in:
parent
cd9701050f
commit
622665952c
@ -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''
|
||||
|
Loading…
Reference in New Issue
Block a user