mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-12-01 01:00:51 +00:00
http2: fix ping response
This commit is contained in:
parent
1f6d05f89f
commit
3a229f60e3
@ -244,7 +244,7 @@ class Http2Layer(_HttpLayer):
|
||||
return
|
||||
if isinstance(frame, PingFrame):
|
||||
# respond with pong
|
||||
self.server_conn.send(PingFrame(flags=Frame.FLAG_ACK, payload=frame.payload).to_bytes())
|
||||
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")
|
||||
|
||||
@ -263,7 +263,7 @@ class Http2Layer(_HttpLayer):
|
||||
return
|
||||
if isinstance(frame, PingFrame):
|
||||
# respond with pong
|
||||
self.client_conn.send(PingFrame(flags=Frame.FLAG_ACK, payload=frame.payload).to_bytes())
|
||||
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")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user