Skip to content

Commit 4eaf0e2

Browse files
committed
Use the port from the URL if provided for H3 [#1139]
(cherry picked from commit 566d103)
1 parent a287921 commit 4eaf0e2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

dns/asyncquery.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ async def _http3(
704704

705705
url_parts = urllib.parse.urlparse(url)
706706
hostname = url_parts.hostname
707+
if url_parts.port is not None:
708+
port = url_parts.port
707709

708710
q.id = 0
709711
wire = q.to_wire()

dns/query.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,8 @@ def _http3(
611611

612612
url_parts = urllib.parse.urlparse(url)
613613
hostname = url_parts.hostname
614+
if url_parts.port is not None:
615+
port = url_parts.port
614616

615617
q.id = 0
616618
wire = q.to_wire()

0 commit comments

Comments
 (0)