From: Brian Wellington Date: Fri, 25 Mar 2022 20:21:16 +0000 (-0700) Subject: Fix httpx verify bug. X-Git-Tag: v2.3.0rc1~78^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b681aeeddc79a4afac2783e45d5767e5ab1988c1;p=thirdparty%2Fdnspython.git Fix httpx verify bug. If both source and verify are passed to dns.query.https() when using httpx, the verify parameter is ignored. This is because the code creates a custom transport for the source address, and httpx only uses the verify parameter when creating a transport. The fix is to pass in the verify parameter when we create a transport. --- diff --git a/dns/query.py b/dns/query.py index 1dd32830..7fa50b93 100644 --- a/dns/query.py +++ b/dns/query.py @@ -357,7 +357,7 @@ def https( # set source port and source address if _have_httpx: if source_port == 0: - transport = httpx.HTTPTransport(local_address=source[0]) + transport = httpx.HTTPTransport(local_address=source[0], verify=verify) else: _httpx_ok = False if _have_requests: