diff --git a/tests/checker/data/http_slash-old-urlunsplit.html b/tests/checker/data/http_slash-old-urlunsplit.html
new file mode 100644
index 00000000..b507fca3
--- /dev/null
+++ b/tests/checker/data/http_slash-old-urlunsplit.html
@@ -0,0 +1,7 @@
+ok example
+one slash example
+no slash example
+no scheme example
+no url
+no url, one slash
+no url, no slash
diff --git a/tests/checker/data/http_slash-old-urlunsplit.html.result b/tests/checker/data/http_slash-old-urlunsplit.html.result
new file mode 100644
index 00000000..b55ee2ab
--- /dev/null
+++ b/tests/checker/data/http_slash-old-urlunsplit.html.result
@@ -0,0 +1,40 @@
+url http://localhost:%(port)d/%(datadir)s/http_slash-old-urlunsplit.html
+cache key http://localhost:%(port)d/%(datadir)s/http_slash-old-urlunsplit.html
+real url http://localhost:%(port)d/%(datadir)s/http_slash-old-urlunsplit.html
+valid
+
+url http:
+cache key None
+real url http://
+name no url, no slash
+error
+
+url http:/
+cache key None
+real url http:///
+name no url, one slash
+error
+
+url http://
+cache key None
+real url http://
+name no url
+error
+
+url http:www.example.com/
+cache key None
+real url http:///www.example.com/
+name no slash example
+error
+
+url http:/www.example.com/
+cache key None
+real url http:///www.example.com/
+name one slash example
+error
+
+url http://www.example.com/
+cache key http://www.example.com/
+real url http://www.example.com/
+name ok example
+valid
diff --git a/tests/checker/data/http_slash.html.result b/tests/checker/data/http_slash.html.result
index 837bf676..4766f20e 100644
--- a/tests/checker/data/http_slash.html.result
+++ b/tests/checker/data/http_slash.html.result
@@ -23,7 +23,7 @@ error
url http:www.example.com/
cache key None
-real url http:///www.example.com/
+real url http:www.example.com/
name no slash example
error
diff --git a/tests/checker/test_http.py b/tests/checker/test_http.py
index 23ba6dad..d191fb00 100644
--- a/tests/checker/test_http.py
+++ b/tests/checker/test_http.py
@@ -16,6 +16,7 @@
"""
Test http checking.
"""
+import sys
from tests import need_network
from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler
@@ -34,7 +35,11 @@ class TestHttp(HttpServerTest):
self.file_test("http.html", confargs=confargs)
self.file_test("http_lowercase.html", confargs=confargs)
self.file_test("http_quotes.html", confargs=confargs)
- self.file_test("http_slash.html", confargs=confargs)
+ if sys.version_info < (3, 12, 6):
+ http_slash_html = "http_slash-old-urlunsplit.html"
+ else:
+ http_slash_html = "http_slash.html"
+ self.file_test(http_slash_html, confargs=confargs)
self.file_test("http_url_quote.html", confargs=confargs)
def test_html(self):