diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-08-10 20:44:36 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-08-10 20:44:36 +0200 |
commit | ff27d65f08d00c312a162965c5b1db711aa8f6ed (patch) | |
tree | 2098e479125bec21c518955907d996a88c6028f7 /netlib/http/http2 | |
parent | 476badf45cd085d69b6162cd48983e3cd22cefcc (diff) | |
download | mitmproxy-ff27d65f08d00c312a162965c5b1db711aa8f6ed.tar.gz mitmproxy-ff27d65f08d00c312a162965c5b1db711aa8f6ed.tar.bz2 mitmproxy-ff27d65f08d00c312a162965c5b1db711aa8f6ed.zip |
cleanup whitespace
Diffstat (limited to 'netlib/http/http2')
-rw-r--r-- | netlib/http/http2/frame.py | 2 | ||||
-rw-r--r-- | netlib/http/http2/protocol.py | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/netlib/http/http2/frame.py b/netlib/http/http2/frame.py index f7e60471..aa1fbae4 100644 --- a/netlib/http/http2/frame.py +++ b/netlib/http/http2/frame.py @@ -117,7 +117,7 @@ class Frame(object): return "\n".join([ "%s: %s | length: %d | flags: %#x | stream_id: %d" % ( - direction, self.__class__.__name__, self.length, self.flags, self.stream_id), + direction, self.__class__.__name__, self.length, self.flags, self.stream_id), self.payload_human_readable(), "===============================================================", ]) diff --git a/netlib/http/http2/protocol.py b/netlib/http/http2/protocol.py index a1ca4a18..896b728b 100644 --- a/netlib/http/http2/protocol.py +++ b/netlib/http/http2/protocol.py @@ -9,6 +9,7 @@ from . import frame class TCPHandler(object): + def __init__(self, rfile, wfile=None): self.rfile = rfile self.wfile = wfile @@ -39,7 +40,6 @@ class HTTP2Protocol(semantics.ProtocolMixin): ALPN_PROTO_H2 = 'h2' - def __init__( self, tcp_handler=None, @@ -60,7 +60,12 @@ class HTTP2Protocol(semantics.ProtocolMixin): self.current_stream_id = None self.connection_preface_performed = False - def read_request(self, include_body=True, body_size_limit=None, allow_empty=False): + def read_request( + self, + include_body=True, + body_size_limit=None, + allow_empty=False, + ): self.perform_connection_preface() timestamp_start = time.time() @@ -92,7 +97,12 @@ class HTTP2Protocol(semantics.ProtocolMixin): return request - def read_response(self, request_method='', body_size_limit=None, include_body=True): + def read_response( + self, + request_method='', + body_size_limit=None, + include_body=True, + ): self.perform_connection_preface() timestamp_start = time.time() @@ -123,7 +133,6 @@ class HTTP2Protocol(semantics.ProtocolMixin): return response - def assemble_request(self, request): assert isinstance(request, semantics.Request) |