]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Use HTTP2 when possible in https() [#973].
authorBob Halley <halley@dnspython.org>
Sat, 5 Aug 2023 16:42:44 +0000 (09:42 -0700)
committerBob Halley <halley@dnspython.org>
Sat, 5 Aug 2023 16:42:44 +0000 (09:42 -0700)
This fixes a regression in 2.4.x where we would only
use HTTP/1.1.

dns/asyncquery.py
dns/query.py

index f503aace7c899ae7bc59e364a4695c19339eb0b7..97295a29ff299d4ed8c0f60d941c6a577d889bb2 100644 (file)
@@ -537,6 +537,8 @@ async def https(
         local_port = source_port
     transport = backend.get_transport_class()(
         local_address=local_address,
+        http1=True,
+        http2=_have_http2,
         verify=verify,
         local_port=local_port,
         bootstrap_address=bootstrap_address,
index bd8388af418541d580ee6f68ec267de014605ca7..0d71125156603e7f60f5710b2a4e8c88048eecc5 100644 (file)
@@ -458,6 +458,8 @@ def https(
         local_port = the_source[1]
     transport = _HTTPTransport(
         local_address=local_address,
+        http1=True,
+        http2=_have_http2,
         verify=verify,
         local_port=local_port,
         bootstrap_address=bootstrap_address,