Skip to content

Commit

Permalink
http2: Ping frames are handled in netlib
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Sep 3, 2015
1 parent 14457f2 commit 47ab7f0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions libmproxy/protocol/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@ def handle_unexpected_frame_from_client(self, frame):
# relay it to the server.
self.server_conn.send(frame.to_bytes())
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")

def handle_unexpected_frame_from_server(self, frame):
Expand All @@ -251,10 +247,6 @@ def handle_unexpected_frame_from_server(self, frame):
# relay it to the client.
self.client_conn.send(frame.to_bytes())
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")


Expand Down

0 comments on commit 47ab7f0

Please sign in to comment.