]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Use the port from the URL if provided for H3 [#1139]
authorBob Halley <halley@dnspython.org>
Sat, 5 Oct 2024 16:36:15 +0000 (09:36 -0700)
committerBob Halley <halley@dnspython.org>
Sat, 5 Oct 2024 16:36:45 +0000 (09:36 -0700)
(cherry picked from commit 566d1031d1e2978ae9501674792e80b31ceac05f)

dns/asyncquery.py
dns/query.py

index e89f836bd2d92674a84bf6eb4faa3f22a6351e07..efad0fd7594ad4bdb47b87696931db98a174d4ea 100644 (file)
@@ -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()
index 43535945da1a60cf288a27a86d25a5b23ee4e0ea..0d8a977abdd2351addfad50f379173f02fe7b80e 100644 (file)
@@ -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()