http2: Ping frames are handled in netlib

This commit is contained in:
Thomas Kriechbaumer 2015-09-03 21:23:19 +02:00
parent 14457f29b3
commit 47ab7f04ea
1 changed files with 0 additions and 8 deletions

View File

@ -232,10 +232,6 @@ class Http2Layer(_HttpLayer):
# relay it to the server. # relay it to the server.
self.server_conn.send(frame.to_bytes()) self.server_conn.send(frame.to_bytes())
return return
if isinstance(frame, PingFrame):
# respond with pong
self.client_conn.send(PingFrame(flags=Frame.FLAG_ACK, payload=frame.payload).to_bytes())
return
self.log("Unexpected HTTP2 frame from client: %s" % frame.human_readable(), "info") self.log("Unexpected HTTP2 frame from client: %s" % frame.human_readable(), "info")
def handle_unexpected_frame_from_server(self, frame): def handle_unexpected_frame_from_server(self, frame):
@ -251,10 +247,6 @@ class Http2Layer(_HttpLayer):
# relay it to the client. # relay it to the client.
self.client_conn.send(frame.to_bytes()) self.client_conn.send(frame.to_bytes())
return return
if isinstance(frame, PingFrame):
# respond with pong
self.server_conn.send(PingFrame(flags=Frame.FLAG_ACK, payload=frame.payload).to_bytes())
return
self.log("Unexpected HTTP2 frame from server: %s" % frame.human_readable(), "info") self.log("Unexpected HTTP2 frame from server: %s" % frame.human_readable(), "info")