Skip to content

Commit

Permalink
Use HTTP2 when possible in https() [#973].
Browse files Browse the repository at this point in the history
This fixes a regression in 2.4.x where we would only
use HTTP/1.1.
  • Loading branch information
rthalley committed Aug 5, 2023
1 parent 7e38fc4 commit 349545a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dns/asyncquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions dns/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 349545a

Please sign in to comment.