aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2020-02-15 14:02:27 +0100
committerGitHub <noreply@github.com>2020-02-15 14:02:27 +0100
commit96762fe65e9cc150ac2548a78babda5ffae8b9f7 (patch)
tree58bfa9f047a408512213e9fb2faf97346301da87 /mitmproxy
parent84cbb8fc1faf55bc56ddbc4ec0af9d7fcdf9729f (diff)
parente25e464acb70c0197dece8e66eaf88db8216b882 (diff)
downloadmitmproxy-96762fe65e9cc150ac2548a78babda5ffae8b9f7.tar.gz
mitmproxy-96762fe65e9cc150ac2548a78babda5ffae8b9f7.tar.bz2
mitmproxy-96762fe65e9cc150ac2548a78babda5ffae8b9f7.zip
Merge pull request #3811 from rohfle/rohfle-http2-send-all-stream-resets
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 89e652e3..f5e7b1c6 100644
--- a/mitmproxy/proxy/protocol/http2.py
+++ b/mitmproxy/proxy/protocol/http2.py
@@ -225,13 +225,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):