From bc93600a66b50d06a7a3a17ee689c5899b61b975 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 3 Sep 2015 13:53:45 +0200 Subject: [PATCH] http2: add GoAway support for client --- libmproxy/protocol/http.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index b345ee06d..222af45fe 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -237,6 +237,11 @@ class Http2Layer(_HttpLayer): # simply accept them, and hide them from the log. # Ideally we should forward them to the server. return + if isinstance(frame, GoAwayFrame): + # Client wants to terminate the connection, + # relay it to the server. + self.server_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())