aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-11-22 17:02:37 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-11-22 17:02:37 +0100
commit21a03d56b5551fd9bf3d93b0de8a01b15027803f (patch)
tree16a797b5054ec18787068fee79366fb7f4446269
parent92516a3b5c3e3ea8e2c7d5a92373f3ebbc4aa681 (diff)
downloadmitmproxy-21a03d56b5551fd9bf3d93b0de8a01b15027803f.tar.gz
mitmproxy-21a03d56b5551fd9bf3d93b0de8a01b15027803f.tar.bz2
mitmproxy-21a03d56b5551fd9bf3d93b0de8a01b15027803f.zip
don't set an empty ALPN, refs #1772
-rw-r--r--mitmproxy/proxy/protocol/tls.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/proxy/protocol/tls.py b/mitmproxy/proxy/protocol/tls.py
index 1cb9b3c2..82c9d096 100644
--- a/mitmproxy/proxy/protocol/tls.py
+++ b/mitmproxy/proxy/protocol/tls.py
@@ -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.: