]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Remove NPN support 314/head
authorDobrovolsky Bogdan <bogdan.gm24@gmail.com>
Wed, 4 Sep 2019 13:01:29 +0000 (16:01 +0300)
committerDobrovolsky Bogdan <bogdan.gm24@gmail.com>
Wed, 4 Sep 2019 13:01:29 +0000 (16:01 +0300)
httpx/concurrency/asyncio.py
httpx/config.py

index 6af8f9c5bbf20a6f0d9dfec3be3350f4b2331438..9e50445abb009bc9aa1dd68487d242592518e483 100644 (file)
@@ -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"
 
index 99e9240f49eea19224b16476409144621204e39b..07b0a73959461834781aacdccbbb8f33a01e7a0a 100644 (file)
@@ -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")