From 1b7b6dcd9390464d6a4c79dceac15414139354f7 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Wed, 28 May 2025 16:32:29 +0900 Subject: Fix server root path in tests --- tst/test_listen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tst/test_listen.py') diff --git a/tst/test_listen.py b/tst/test_listen.py index 573330b..b38a26a 100644 --- a/tst/test_listen.py +++ b/tst/test_listen.py @@ -146,8 +146,9 @@ def is_root(base_url, url): Paths starting with // are excluded because urljoin sometimes confuse them with URL scheme. """ + base_path = urlsplit(base_url).path url_path = urlsplit(url).path - return (urlsplit(urljoin(base_url, url_path)).path == url_path + return (urlsplit(urljoin(base_url, url_path)).path == base_path and not url_path.startswith('//')) -- cgit 1.4.1