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()