From: Bob Halley Date: Sat, 5 Aug 2023 16:42:44 +0000 (-0700) Subject: Use HTTP2 when possible in https() [#973]. X-Git-Tag: v2.5.0rc1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=349545a05151acd389e06f28975b4f3e4f426977;p=thirdparty%2Fdnspython.git Use HTTP2 when possible in https() [#973]. This fixes a regression in 2.4.x where we would only use HTTP/1.1. --- diff --git a/dns/asyncquery.py b/dns/asyncquery.py index f503aace..97295a29 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -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, diff --git a/dns/query.py b/dns/query.py index bd8388af..0d711251 100644 --- a/dns/query.py +++ b/dns/query.py @@ -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,