From: Bob Halley Date: Sat, 5 Oct 2024 16:36:15 +0000 (-0700) Subject: Use the port from the URL if provided for H3 [#1139] X-Git-Tag: v2.8.0rc1~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=566d1031d1e2978ae9501674792e80b31ceac05f;p=thirdparty%2Fdnspython.git Use the port from the URL if provided for H3 [#1139] --- diff --git a/dns/asyncquery.py b/dns/asyncquery.py index e89f836b..efad0fd7 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -704,6 +704,8 @@ async def _http3( url_parts = urllib.parse.urlparse(url) hostname = url_parts.hostname + if url_parts.port is not None: + port = url_parts.port q.id = 0 wire = q.to_wire() diff --git a/dns/query.py b/dns/query.py index 43535945..0d8a977a 100644 --- a/dns/query.py +++ b/dns/query.py @@ -611,6 +611,8 @@ def _http3( url_parts = urllib.parse.urlparse(url) hostname = url_parts.hostname + if url_parts.port is not None: + port = url_parts.port q.id = 0 wire = q.to_wire()