aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy
diff options
context:
space:
mode:
authorRohan Fletcher <rohfle@gmail.com>2020-02-06 17:31:06 +1300
committerRohan Fletcher <rohfle@gmail.com>2020-02-06 17:31:06 +1300
commit50e8fc28041726774adbacce2cf3db6751c70cc3 (patch)
tree5004cf69495da074ab978b9c5b755353a235bbec /mitmproxy
parent735b8e35c9d142e43f002dfe224f431399548e3b (diff)
downloadmitmproxy-50e8fc28041726774adbacce2cf3db6751c70cc3.tar.gz
mitmproxy-50e8fc28041726774adbacce2cf3db6751c70cc3.tar.bz2
mitmproxy-50e8fc28041726774adbacce2cf3db6751c70cc3.zip
http2: send all stream reset types to other connection
Diffstat (limited to 'mitmproxy')
-rw-r--r--mitmproxy/proxy/protocol/http2.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/mitmproxy/proxy/protocol/http2.py b/mitmproxy/proxy/protocol/http2.py
index a5870e6c..a6fcc52b 100644
--- a/mitmproxy/proxy/protocol/http2.py
+++ b/mitmproxy/proxy/protocol/http2.py
@@ -209,13 +209,12 @@ class Http2Layer(base.Layer):
def _handle_stream_reset(self, eid, event, is_server, other_conn):
if eid in self.streams:
self.streams[eid].kill()
- if event.error_code == h2.errors.ErrorCodes.CANCEL:
- if is_server:
- other_stream_id = self.streams[eid].client_stream_id
- else:
- other_stream_id = self.streams[eid].server_stream_id
- if other_stream_id is not None:
- self.connections[other_conn].safe_reset_stream(other_stream_id, event.error_code)
+ if is_server:
+ other_stream_id = self.streams[eid].client_stream_id
+ else:
+ other_stream_id = self.streams[eid].server_stream_id
+ if other_stream_id is not None:
+ self.connections[other_conn].safe_reset_stream(other_stream_id, event.error_code)
return True
def _handle_remote_settings_changed(self, event, other_conn):