From: Dobrovolsky Bogdan Date: Wed, 4 Sep 2019 13:01:29 +0000 (+0300) Subject: Remove NPN support X-Git-Tag: 0.7.3~22^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0953d1d863a8bde628b0d9739b56ee6f98e0972;p=thirdparty%2Fhttpx.git Remove NPN support --- diff --git a/httpx/concurrency/asyncio.py b/httpx/concurrency/asyncio.py index 6af8f9c5..9e50445a 100644 --- a/httpx/concurrency/asyncio.py +++ b/httpx/concurrency/asyncio.py @@ -68,8 +68,9 @@ class Stream(BaseStream): return "HTTP/1.1" ident = ssl_object.selected_alpn_protocol() + if ident is None: - ident = ssl_object.selected_npn_protocol() + return "HTTP/1.1" return "HTTP/2" if ident == "h2" else "HTTP/1.1" diff --git a/httpx/config.py b/httpx/config.py index 99e9240f..07b0a739 100644 --- a/httpx/config.py +++ b/httpx/config.py @@ -171,8 +171,6 @@ class SSLConfig: if ssl.HAS_ALPN: context.set_alpn_protocols(http_versions.alpn_identifiers) - if ssl.HAS_NPN: # pragma: no cover - context.set_npn_protocols(http_versions.alpn_identifiers) if hasattr(context, "keylog_filename"): keylogfile = os.environ.get("SSLKEYLOGFILE")