From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/url/tests/urltestdata.json | 1429 +++++++++++++++++++++++++++++++------ 1 file changed, 1220 insertions(+), 209 deletions(-) (limited to 'vendor/url/tests/urltestdata.json') diff --git a/vendor/url/tests/urltestdata.json b/vendor/url/tests/urltestdata.json index 4265f5928..53d036886 100644 --- a/vendor/url/tests/urltestdata.json +++ b/vendor/url/tests/urltestdata.json @@ -1,6 +1,5 @@ [ "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js", - "# AS OF https://github.com/web-platform-tests/wpt/commit/2a64dae4641fbd61bd4257df460e188f425b492e", { "input": "http://example\t.\norg", "base": "http://example.org/foo/bar", @@ -965,6 +964,11 @@ "search": "", "hash": "" }, + { + "input": "http://[::127.0.0.1.]", + "base": "http://example.org/foo/bar", + "failure": true + }, { "input": "http://[0:0:0:0:0:0:13.1.68.3]", "base": "http://example.org/foo/bar", @@ -3918,6 +3922,22 @@ "search": "", "hash": "" }, + "Non-special domains with empty labels", + { + "input": "h://.", + "base": "about:blank", + "href": "h://.", + "origin": "null", + "protocol": "h:", + "username": "", + "password": "", + "host": ".", + "hostname": ".", + "port": "", + "pathname": "", + "search": "", + "hash": "" + }, "Broken IPv6", { "input": "http://[www.google.com]/", @@ -3944,11 +3964,31 @@ "base": "http://other.com/", "failure": true }, + { + "input": "http://[::.1.2]", + "base": "http://other.com/", + "failure": true + }, { "input": "http://[::1.]", "base": "http://other.com/", "failure": true }, + { + "input": "http://[::.1]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[::%31]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://%5B::1]", + "base": "http://other.com/", + "failure": true + }, "Misc Unicode", { "input": "http://foo:💩@example.com/bar", @@ -5895,6 +5935,21 @@ "search": "", "hash": "" }, + "skip next", + { + "input": "/", + "base": "file://h/C:/a/b", + "href": "file://h/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "h", + "hostname": "h", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, { "input": "/", "base": "file://h/a/b", @@ -6050,405 +6105,858 @@ "hash": "#x" }, "# File URLs and many (back)slashes", + "skip next", { - "input": "file:///localhost//cat", + "input": "file:\\\\//", "base": "about:blank", - "href": "file:///localhost//cat", + "href": "file:////", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/localhost//cat", + "pathname": "//", "search": "", "hash": "" }, + "skip next", { - "input": "\\//pig", - "base": "file://lion/", - "href": "file:///pig", + "input": "file:\\\\\\\\", + "base": "about:blank", + "href": "file:////", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/pig", + "pathname": "//", "search": "", "hash": "" }, + "skip next", { - "input": "file://", - "base": "file://ape/", - "href": "file:///", + "input": "file:\\\\\\\\?fox", + "base": "about:blank", + "href": "file:////?fox", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/", - "search": "", + "pathname": "//", + "search": "?fox", "hash": "" }, - "# File URLs with non-empty hosts", + "skip next", { - "input": "/rooibos", - "base": "file://tea/", - "href": "file://tea/rooibos", + "input": "file:\\\\\\\\#guppy", + "base": "about:blank", + "href": "file:////#guppy", "protocol": "file:", "username": "", "password": "", - "host": "tea", - "hostname": "tea", + "host": "", + "hostname": "", "port": "", - "pathname": "/rooibos", + "pathname": "//", "search": "", - "hash": "" - }, - { - "input": "/?chai", - "base": "file://tea/", - "href": "file://tea/?chai", - "protocol": "file:", - "username": "", - "password": "", - "host": "tea", - "hostname": "tea", - "port": "", - "pathname": "/", - "search": "?chai", - "hash": "" + "hash": "#guppy" }, - "# Windows drive letter handling with the 'file:' base URL", + "skip next", { - "input": "C", - "base": "file://host/dir/file", - "href": "file://host/dir/C", + "input": "file://spider///", + "base": "about:blank", + "href": "file://spider///", "protocol": "file:", "username": "", "password": "", - "host": "host", - "hostname": "host", + "host": "spider", + "hostname": "spider", "port": "", - "pathname": "/dir/C", + "pathname": "///", "search": "", "hash": "" }, + "skip next", { - "input": "C|a", - "base": "file://host/dir/file", - "href": "file://host/dir/C|a", + "input": "file:\\\\localhost//", + "base": "about:blank", + "href": "file:////", "protocol": "file:", "username": "", "password": "", - "host": "host", - "hostname": "host", + "host": "", + "hostname": "", "port": "", - "pathname": "/dir/C|a", + "pathname": "//", "search": "", "hash": "" }, - "# Windows drive letter quirk in the file slash state", { - "input": "/c:/foo/bar", - "base": "file:///c:/baz/qux", - "href": "file:///c:/foo/bar", + "input": "file:///localhost//cat", + "base": "about:blank", + "href": "file:///localhost//cat", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/c:/foo/bar", + "pathname": "/localhost//cat", "search": "", "hash": "" }, + "skip next", { - "input": "/c|/foo/bar", - "base": "file:///c:/baz/qux", - "href": "file:///c:/foo/bar", + "input": "file://\\/localhost//cat", + "base": "about:blank", + "href": "file:////localhost//cat", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/c:/foo/bar", + "pathname": "//localhost//cat", "search": "", "hash": "" }, + "skip next", { - "input": "file:\\c:\\foo\\bar", - "base": "file:///c:/baz/qux", - "href": "file:///c:/foo/bar", + "input": "file://localhost//a//../..//", + "base": "about:blank", + "href": "file://///", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/c:/foo/bar", + "pathname": "///", "search": "", "hash": "" }, - "# Copy the empty host from the input in the following cases", + "skip next", { - "input": "//C:/", - "base": "file://host/", - "href": "file:///C:/", + "input": "/////mouse", + "base": "file:///elephant", + "href": "file://///mouse", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/C:/", + "pathname": "///mouse", "search": "", "hash": "" }, { - "input": "file://C:/", - "base": "file://host/", - "href": "file:///C:/", + "input": "\\//pig", + "base": "file://lion/", + "href": "file:///pig", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/C:/", + "pathname": "/pig", "search": "", "hash": "" }, + "skip next", { - "input": "///C:/", - "base": "file://host/", - "href": "file:///C:/", + "input": "\\/localhost//pig", + "base": "file://lion/", + "href": "file:////pig", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/C:/", + "pathname": "//pig", "search": "", "hash": "" }, + "skip next", { - "input": "file:///C:/", - "base": "file://host/", - "href": "file:///C:/", + "input": "//localhost//pig", + "base": "file://lion/", + "href": "file:////pig", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/C:/", + "pathname": "//pig", "search": "", "hash": "" }, - "# Windows drive letter quirk (no host)", + "skip next", { - "input": "file:/C|/", - "base": "about:blank", - "href": "file:///C:/", + "input": "/..//localhost//pig", + "base": "file://lion/", + "href": "file://lion//localhost//pig", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "lion", + "hostname": "lion", "port": "", - "pathname": "/C:/", + "pathname": "//localhost//pig", "search": "", "hash": "" }, { - "input": "file://C|/", - "base": "about:blank", - "href": "file:///C:/", + "input": "file://", + "base": "file://ape/", + "href": "file:///", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/C:/", + "pathname": "/", "search": "", "hash": "" }, - "# file URLs without base URL by Rimas Misevičius", + "# File URLs with non-empty hosts", { - "input": "file:", - "base": "about:blank", - "href": "file:///", + "input": "/rooibos", + "base": "file://tea/", + "href": "file://tea/rooibos", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "tea", + "hostname": "tea", "port": "", - "pathname": "/", + "pathname": "/rooibos", "search": "", "hash": "" }, { - "input": "file:?q=v", - "base": "about:blank", - "href": "file:///?q=v", + "input": "/?chai", + "base": "file://tea/", + "href": "file://tea/?chai", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "tea", + "hostname": "tea", "port": "", "pathname": "/", - "search": "?q=v", + "search": "?chai", "hash": "" }, + "# Windows drive letter handling with the 'file:' base URL", + "skip next", { - "input": "file:#frag", - "base": "about:blank", - "href": "file:///#frag", + "input": "C|", + "base": "file://host/dir/file", + "href": "file://host/C:", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "host", + "hostname": "host", "port": "", - "pathname": "/", + "pathname": "/C:", "search": "", - "hash": "#frag" + "hash": "" }, - "# file: drive letter cases from https://crbug.com/1078698", + "skip next", { - "input": "file:///Y:", - "base": "about:blank", - "href": "file:///Y:", + "input": "C|", + "base": "file://host/D:/dir1/dir2/file", + "href": "file://host/C:", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "host", + "hostname": "host", "port": "", - "pathname": "/Y:", + "pathname": "/C:", "search": "", "hash": "" }, + "skip next", { - "input": "file:///Y:/", - "base": "about:blank", - "href": "file:///Y:/", + "input": "C|#", + "base": "file://host/dir/file", + "href": "file://host/C:#", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "host", + "hostname": "host", "port": "", - "pathname": "/Y:/", + "pathname": "/C:", "search": "", "hash": "" }, + "skip next", { - "input": "file:///./Y", - "base": "about:blank", - "href": "file:///Y", + "input": "C|?", + "base": "file://host/dir/file", + "href": "file://host/C:?", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "host", + "hostname": "host", "port": "", - "pathname": "/Y", + "pathname": "/C:", "search": "", "hash": "" }, + "skip next", { - "input": "file:///./Y:", - "base": "about:blank", - "href": "file:///Y:", + "input": "C|/", + "base": "file://host/dir/file", + "href": "file://host/C:/", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "host", + "hostname": "host", "port": "", - "pathname": "/Y:", + "pathname": "/C:/", "search": "", "hash": "" }, + "skip next", { - "input": "\\\\\\.\\Y:", - "base": "about:blank", - "failure": true, - "inputCanBeRelative": true - }, - "# file: drive letter cases from https://crbug.com/1078698 but lowercased", - { - "input": "file:///y:", - "base": "about:blank", - "href": "file:///y:", + "input": "C|\n/", + "base": "file://host/dir/file", + "href": "file://host/C:/", "protocol": "file:", "username": "", "password": "", - "host": "", - "hostname": "", + "host": "host", + "hostname": "host", "port": "", - "pathname": "/y:", + "pathname": "/C:/", "search": "", "hash": "" }, + "skip next", { - "input": "file:///y:/", + "input": "C|\\", + "base": "file://host/dir/file", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "C", + "base": "file://host/dir/file", + "href": "file://host/dir/C", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/dir/C", + "search": "", + "hash": "" + }, + { + "input": "C|a", + "base": "file://host/dir/file", + "href": "file://host/dir/C|a", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/dir/C|a", + "search": "", + "hash": "" + }, + "# Windows drive letter quirk in the file slash state", + { + "input": "/c:/foo/bar", + "base": "file:///c:/baz/qux", + "href": "file:///c:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/c|/foo/bar", + "base": "file:///c:/baz/qux", + "href": "file:///c:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "file:\\c:\\foo\\bar", + "base": "file:///c:/baz/qux", + "href": "file:///c:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "/c:/foo/bar", + "base": "file://host/path", + "href": "file://host/c:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/c:/foo/bar", + "search": "", + "hash": "" + }, + "# Do not drop the host in the presence of a drive letter", + "skip next", + { + "input": "file://example.net/C:/", + "base": "about:blank", + "href": "file://example.net/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "example.net", + "hostname": "example.net", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "file://1.2.3.4/C:/", + "base": "about:blank", + "href": "file://1.2.3.4/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "1.2.3.4", + "hostname": "1.2.3.4", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "file://[1::8]/C:/", + "base": "about:blank", + "href": "file://[1::8]/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "[1::8]", + "hostname": "[1::8]", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "# Copy the host from the base URL in the following cases", + "skip next", + { + "input": "C|/", + "base": "file://host/", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "/C:/", + "base": "file://host/", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "file:C:/", + "base": "file://host/", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "file:/C:/", + "base": "file://host/", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "# Copy the empty host from the input in the following cases", + "skip next", + { + "input": "//C:/", + "base": "file://host/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file://C:/", + "base": "file://host/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "///C:/", + "base": "file://host/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file:///C:/", + "base": "file://host/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "# Windows drive letter quirk (no host)", + { + "input": "file:/C|/", + "base": "about:blank", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file://C|/", + "base": "about:blank", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "# file URLs without base URL by Rimas Misevičius", + { + "input": "file:", + "base": "about:blank", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file:?q=v", + "base": "about:blank", + "href": "file:///?q=v", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "?q=v", + "hash": "" + }, + { + "input": "file:#frag", + "base": "about:blank", + "href": "file:///#frag", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "#frag" + }, + "# file: drive letter cases from https://crbug.com/1078698", + { + "input": "file:///Y:", + "base": "about:blank", + "href": "file:///Y:", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/Y:", + "search": "", + "hash": "" + }, + { + "input": "file:///Y:/", + "base": "about:blank", + "href": "file:///Y:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/Y:/", + "search": "", + "hash": "" + }, + { + "input": "file:///./Y", + "base": "about:blank", + "href": "file:///Y", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/Y", + "search": "", + "hash": "" + }, + { + "input": "file:///./Y:", + "base": "about:blank", + "href": "file:///Y:", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/Y:", + "search": "", + "hash": "" + }, + { + "input": "\\\\\\.\\Y:", + "base": "about:blank", + "failure": true, + "inputCanBeRelative": true + }, + "# file: drive letter cases from https://crbug.com/1078698 but lowercased", + { + "input": "file:///y:", + "base": "about:blank", + "href": "file:///y:", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/y:", + "search": "", + "hash": "" + }, + { + "input": "file:///y:/", + "base": "about:blank", + "href": "file:///y:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/y:/", + "search": "", + "hash": "" + }, + { + "input": "file:///./y", + "base": "about:blank", + "href": "file:///y", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/y", + "search": "", + "hash": "" + }, + { + "input": "file:///./y:", "base": "about:blank", - "href": "file:///y:/", + "href": "file:///y:", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/y:/", + "pathname": "/y:", "search": "", "hash": "" }, { - "input": "file:///./y", + "input": "\\\\\\.\\y:", "base": "about:blank", - "href": "file:///y", + "failure": true, + "inputCanBeRelative": true + }, + "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)", + "skip next", + { + "input": "file://localhost//a//../..//foo", + "base": "about:blank", + "href": "file://///foo", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/y", + "pathname": "///foo", "search": "", "hash": "" }, + "skip next", { - "input": "file:///./y:", + "input": "file://localhost////foo", "base": "about:blank", - "href": "file:///y:", + "href": "file://////foo", "protocol": "file:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "/y:", + "pathname": "////foo", "search": "", "hash": "" }, + "skip next", { - "input": "\\\\\\.\\y:", + "input": "file:////foo", "base": "about:blank", - "failure": true, - "inputCanBeRelative": true + "href": "file:////foo", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//foo", + "search": "", + "hash": "" }, - "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)", { "input": "file:///one/two", "base": "file:///", @@ -6463,6 +6971,21 @@ "search": "", "hash": "" }, + "skip next", + { + "input": "file:////one/two", + "base": "file:///", + "href": "file:////one/two", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//one/two", + "search": "", + "hash": "" + }, { "input": "//one/two", "base": "file:///", @@ -6491,6 +7014,67 @@ "search": "", "hash": "" }, + "skip next", + { + "input": "////one/two", + "base": "file:///", + "href": "file:////one/two", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//one/two", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "file:///.//", + "base": "file:////", + "href": "file:////", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + "File URL tests for https://github.com/whatwg/url/issues/549", + "skip next", + { + "input": "file:.//p", + "base": "about:blank", + "href": "file:////p", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//p", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "file:/.//p", + "base": "about:blank", + "href": "file:////p", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//p", + "search": "", + "hash": "" + }, "# IPv6 tests", { "input": "http://[1:0::]", @@ -6813,92 +7397,277 @@ "hash": "" }, { - "input": "irc://myserver.com:6999/channel?passwd", - "base": "about:blank", - "href": "irc://myserver.com:6999/channel?passwd", - "origin": "null", - "protocol": "irc:", + "input": "irc://myserver.com:6999/channel?passwd", + "base": "about:blank", + "href": "irc://myserver.com:6999/channel?passwd", + "origin": "null", + "protocol": "irc:", + "username": "", + "password": "", + "host": "myserver.com:6999", + "hostname": "myserver.com", + "port": "6999", + "pathname": "/channel", + "search": "?passwd", + "hash": "" + }, + { + "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT", + "base": "about:blank", + "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT", + "origin": "null", + "protocol": "dns:", + "username": "", + "password": "", + "host": "fw.example.org:9999", + "hostname": "fw.example.org", + "port": "9999", + "pathname": "/foo.bar.org", + "search": "?type=TXT", + "hash": "" + }, + { + "input": "ldap://localhost:389/ou=People,o=JNDITutorial", + "base": "about:blank", + "href": "ldap://localhost:389/ou=People,o=JNDITutorial", + "origin": "null", + "protocol": "ldap:", + "username": "", + "password": "", + "host": "localhost:389", + "hostname": "localhost", + "port": "389", + "pathname": "/ou=People,o=JNDITutorial", + "search": "", + "hash": "" + }, + { + "input": "git+https://github.com/foo/bar", + "base": "about:blank", + "href": "git+https://github.com/foo/bar", + "origin": "null", + "protocol": "git+https:", + "username": "", + "password": "", + "host": "github.com", + "hostname": "github.com", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "urn:ietf:rfc:2648", + "base": "about:blank", + "href": "urn:ietf:rfc:2648", + "origin": "null", + "protocol": "urn:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "ietf:rfc:2648", + "search": "", + "hash": "" + }, + { + "input": "tag:joe@example.org,2001:foo/bar", + "base": "about:blank", + "href": "tag:joe@example.org,2001:foo/bar", + "origin": "null", + "protocol": "tag:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "joe@example.org,2001:foo/bar", + "search": "", + "hash": "" + }, + "Serialize /. in path", + { + "input": "non-spec:/.//", + "base": "about:blank", + "href": "non-spec:/.//", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/..//", + "base": "about:blank", + "href": "non-spec:/.//", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/a/..//", + "base": "about:blank", + "href": "non-spec:/.//", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/.//path", + "base": "about:blank", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/..//path", + "base": "about:blank", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/a/..//path", + "base": "about:blank", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + "skip next", + { + "input": "/.//path", + "base": "non-spec:/p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "/..//path", + "base": "non-spec:/p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", "username": "", "password": "", - "host": "myserver.com:6999", - "hostname": "myserver.com", - "port": "6999", - "pathname": "/channel", - "search": "?passwd", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", "hash": "" }, { - "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT", - "base": "about:blank", - "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT", - "origin": "null", - "protocol": "dns:", + "input": "..//path", + "base": "non-spec:/p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", "username": "", "password": "", - "host": "fw.example.org:9999", - "hostname": "fw.example.org", - "port": "9999", - "pathname": "/foo.bar.org", - "search": "?type=TXT", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", "hash": "" }, { - "input": "ldap://localhost:389/ou=People,o=JNDITutorial", - "base": "about:blank", - "href": "ldap://localhost:389/ou=People,o=JNDITutorial", - "origin": "null", - "protocol": "ldap:", + "input": "a/..//path", + "base": "non-spec:/p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", "username": "", "password": "", - "host": "localhost:389", - "hostname": "localhost", - "port": "389", - "pathname": "/ou=People,o=JNDITutorial", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", "search": "", "hash": "" }, { - "input": "git+https://github.com/foo/bar", - "base": "about:blank", - "href": "git+https://github.com/foo/bar", - "origin": "null", - "protocol": "git+https:", + "input": "", + "base": "non-spec:/..//p", + "href": "non-spec:/.//p", + "protocol": "non-spec:", "username": "", "password": "", - "host": "github.com", - "hostname": "github.com", + "host": "", + "hostname": "", "port": "", - "pathname": "/foo/bar", + "pathname": "//p", "search": "", "hash": "" }, { - "input": "urn:ietf:rfc:2648", - "base": "about:blank", - "href": "urn:ietf:rfc:2648", - "origin": "null", - "protocol": "urn:", + "input": "path", + "base": "non-spec:/..//p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "ietf:rfc:2648", + "pathname": "//path", "search": "", "hash": "" }, + "Do not serialize /. in path", { - "input": "tag:joe@example.org,2001:foo/bar", - "base": "about:blank", - "href": "tag:joe@example.org,2001:foo/bar", - "origin": "null", - "protocol": "tag:", + "input": "../path", + "base": "non-spec:/.//p", + "href": "non-spec:/path", + "protocol": "non-spec:", "username": "", "password": "", "host": "", "hostname": "", "port": "", - "pathname": "joe@example.org,2001:foo/bar", + "pathname": "/path", "search": "", "hash": "" }, @@ -7419,6 +8188,21 @@ "search": "", "hash": "" }, + "IDNA hostnames which get mapped to 'localhost'", + { + "input": "file://loC𝐀𝐋𝐇𝐨𝐬𝐭/usr/bin", + "base": "about:blank", + "href": "file:///usr/bin", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/usr/bin", + "search": "", + "hash": "" + }, "Empty host after the domain to ASCII", { "input": "file://\u00ad/p", @@ -7904,5 +8688,232 @@ "input": "http://💩.123/", "base": "about:blank", "failure": true + }, + "U+0000 and U+FFFF in various places", + { + "input": "https://\u0000y", + "base": "about:blank", + "failure": true + }, + { + "input": "https://x/\u0000y", + "base": "about:blank", + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/%00y", + "password": "", + "pathname": "/%00y", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://x/?\u0000y", + "base": "about:blank", + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/?%00y", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "?%00y", + "username": "" + }, + { + "input": "https://x/?#\u0000y", + "base": "about:blank", + "hash": "#%00y", + "host": "x", + "hostname": "x", + "href": "https://x/?#%00y", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://\uFFFFy", + "base": "about:blank", + "failure": true + }, + { + "input": "https://x/\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/%EF%BF%BFy", + "password": "", + "pathname": "/%EF%BF%BFy", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://x/?\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/?%EF%BF%BFy", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "?%EF%BF%BFy", + "username": "" + }, + { + "input": "https://x/?#\uFFFFy", + "base": "about:blank", + "hash": "#%EF%BF%BFy", + "host": "x", + "hostname": "x", + "href": "https://x/?#%EF%BF%BFy", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "non-special:\u0000y", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:%00y", + "password": "", + "pathname": "%00y", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/\u0000y", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/%00y", + "password": "", + "pathname": "x/%00y", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/?\u0000y", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/?%00y", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "?%00y", + "username": "" + }, + { + "input": "non-special:x/?#\u0000y", + "base": "about:blank", + "hash": "#%00y", + "host": "", + "hostname": "", + "href": "non-special:x/?#%00y", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:%EF%BF%BFy", + "password": "", + "pathname": "%EF%BF%BFy", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/%EF%BF%BFy", + "password": "", + "pathname": "x/%EF%BF%BFy", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/?\uFFFFy", + "base": "about:blank", + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/?%EF%BF%BFy", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "?%EF%BF%BFy", + "username": "" + }, + { + "input": "non-special:x/?#\uFFFFy", + "base": "about:blank", + "hash": "#%EF%BF%BFy", + "host": "", + "hostname": "", + "href": "non-special:x/?#%EF%BF%BFy", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "", + "base": "about:blank", + "failure": true + }, + { + "input": "https://example.com/\"quoted\"", + "base": "about:blank", + "hash": "", + "host": "example.com", + "hostname": "example.com", + "href": "https://example.com/%22quoted%22", + "origin": "https://example.com", + "password": "", + "pathname": "/%22quoted%22", + "port": "", + "protocol": "https:", + "search": "", + "username": "" } ] -- cgit v1.2.3