aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-02-02 15:49:21 +0100
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-02-04 09:52:28 +0100
commit68bcc82b8e4c219b024bff0081741c799b9cbd74 (patch)
tree8902d7aaa5d7efffb5eebebfaabd894b2d36977a /libmproxy
parent6bc1755750f8a7986ab26ff28ea0e90ad0ccaacd (diff)
downloadmitmproxy-68bcc82b8e4c219b024bff0081741c799b9cbd74.tar.gz
mitmproxy-68bcc82b8e4c219b024bff0081741c799b9cbd74.tar.bz2
mitmproxy-68bcc82b8e4c219b024bff0081741c799b9cbd74.zip
do not send RST if there is not upstream stream openend yet
Diffstat (limited to 'libmproxy')
-rw-r--r--libmproxy/protocol/http2.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmproxy/protocol/http2.py b/libmproxy/protocol/http2.py
index 4b3ef0ed..fe9f8695 100644
--- a/libmproxy/protocol/http2.py
+++ b/libmproxy/protocol/http2.py
@@ -161,7 +161,8 @@ class Http2Layer(Layer):
other_stream_id = self.streams[eid].client_stream_id
else:
other_stream_id = self.streams[eid].server_stream_id
- other_conn.h2.safe_reset_stream(other_stream_id, event.error_code)
+ if other_stream_id is not None:
+ other_conn.h2.safe_reset_stream(other_stream_id, event.error_code)
elif isinstance(event, RemoteSettingsChanged):
new_settings = dict([(id, cs.new_value) for (id, cs) in event.changed_settings.iteritems()])
other_conn.h2.safe_update_settings(new_settings)