From 4eaf0e25b511bd48586022baa805329bdf304653 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sat, 5 Oct 2024 09:36:15 -0700 Subject: [PATCH] Use the port from the URL if provided for H3 [#1139] (cherry picked from commit 566d1031d1e2978ae9501674792e80b31ceac05f) --- dns/asyncquery.py | 2 ++ dns/query.py | 2 ++ 2 files changed, 4 insertions(+) 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() -- 2.47.3