aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-09-03 13:53:45 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-09-03 13:55:13 +0200
commitbc93600a66b50d06a7a3a17ee689c5899b61b975 (patch)
tree4a9faff89e301cb7c81f29c9869f0e795012ba78 /libmproxy/protocol
parentb4d6f2e12b031ed1fa95b6a029d11dfa9f52d4e9 (diff)
downloadmitmproxy-bc93600a66b50d06a7a3a17ee689c5899b61b975.tar.gz
mitmproxy-bc93600a66b50d06a7a3a17ee689c5899b61b975.tar.bz2
mitmproxy-bc93600a66b50d06a7a3a17ee689c5899b61b975.zip
http2: add GoAway support for client
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r--libmproxy/protocol/http.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index b345ee06..222af45f 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())