aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol2/root_context.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/protocol2/root_context.py')
-rw-r--r--libmproxy/protocol2/root_context.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmproxy/protocol2/root_context.py b/libmproxy/protocol2/root_context.py
index d0c62be4..880bc160 100644
--- a/libmproxy/protocol2/root_context.py
+++ b/libmproxy/protocol2/root_context.py
@@ -47,9 +47,10 @@ class RootContext(object):
d = top_layer.client_conn.rfile.peek(len(HTTP2Protocol.CLIENT_CONNECTION_PREFACE))
is_http2_magic = (d == HTTP2Protocol.CLIENT_CONNECTION_PREFACE)
+ alpn_proto_negotiated = top_layer.client_conn.get_alpn_proto_negotiated()
is_alpn_h2_negotiated = (
isinstance(top_layer, TlsLayer) and
- top_layer.client_conn.get_alpn_proto_negotiated() == HTTP2Protocol.ALPN_PROTO_H2
+ alpn_proto_negotiated == HTTP2Protocol.ALPN_PROTO_H2
)
if is_tls_client_hello: