mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
don't set an empty ALPN, refs #1772
This commit is contained in:
parent
92516a3b5c
commit
21a03d56b5
@ -503,7 +503,7 @@ class TlsLayer(base.Layer):
|
||||
if alpn and b"h2" in alpn and not self.config.options.http2:
|
||||
alpn.remove(b"h2")
|
||||
|
||||
if self.client_conn.ssl_established:
|
||||
if self.client_conn.ssl_established and self.client_conn.connection.get_alpn_proto_negotiated():
|
||||
# If the client has already negotiated an ALP, then force the
|
||||
# server to use the same. This can only happen if the host gets
|
||||
# changed after the initial connection was established. E.g.:
|
||||
|
Loading…
Reference in New Issue
Block a user