diff options
Diffstat (limited to 'pathod')
-rw-r--r-- | pathod/pathod.py | 6 | ||||
-rw-r--r-- | pathod/protocols/http2.py | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/pathod/pathod.py b/pathod/pathod.py index bd0feb73..4f6c3d38 100644 --- a/pathod/pathod.py +++ b/pathod/pathod.py @@ -174,12 +174,12 @@ class PathodHandler(tcp.BaseHandler): m = utils.MemBool() - valid_websockets_handshake = websockets.check_handshake(headers) + valid_websocket_handshake = websockets.check_handshake(headers) self.settings.websocket_key = websockets.get_client_key(headers) # If this is a websocket initiation, we respond with a proper # server response, unless over-ridden. - if valid_websockets_handshake: + if valid_websocket_handshake: anchor_gen = language.parse_pathod("ws") else: anchor_gen = None @@ -226,7 +226,7 @@ class PathodHandler(tcp.BaseHandler): spec, lg ) - if nexthandler and valid_websockets_handshake: + if nexthandler and valid_websocket_handshake: self.protocol = protocols.websockets.WebsocketsProtocol(self) return self.protocol.handle_websocket, retlog else: diff --git a/pathod/protocols/http2.py b/pathod/protocols/http2.py index 7b162664..78fe6111 100644 --- a/pathod/protocols/http2.py +++ b/pathod/protocols/http2.py @@ -250,13 +250,13 @@ class HTTP2StateProtocol(object): self.tcp_handler.wfile.write(raw_bytes) self.tcp_handler.wfile.flush() if not hide and self.dump_frames: # pragma no cover - print(frm.human_readable(">>")) + print(">> " + repr(frm)) def read_frame(self, hide=False): while True: frm = http2.parse_frame(*http2.read_raw_frame(self.tcp_handler.rfile)) if not hide and self.dump_frames: # pragma no cover - print(frm.human_readable("<<")) + print("<< " + repr(frm)) if isinstance(frm, hyperframe.frame.PingFrame): raw_bytes = hyperframe.frame.PingFrame(flags=['ACK'], payload=frm.payload).serialize() @@ -341,7 +341,7 @@ class HTTP2StateProtocol(object): if self.dump_frames: # pragma no cover for frm in frms: - print(frm.human_readable(">>")) + print(">> ", repr(frm)) return [frm.serialize() for frm in frms] @@ -359,7 +359,7 @@ class HTTP2StateProtocol(object): if self.dump_frames: # pragma no cover for frm in frms: - print(frm.human_readable(">>")) + print(">> ", repr(frm)) return [frm.serialize() for frm in frms] |