|
|
@@ -1,5 +1,5 @@
|
|
|
[
|
|
|
- "# Pulled from https://github.com/web-platform-tests/wpt/blob/befe66343e5f21dc464c8c772c6d20695936714f/url/resources/urltestdata.json",
|
|
|
+ "# Pulled from https://github.com/web-platform-tests/wpt/blob/876fe001f2279b96e7c6b9e8970dc92c484835ff/url/resources/urltestdata.json",
|
|
|
{
|
|
|
"input": "http://example\t.\norg",
|
|
|
"base": "http://example.org/foo/bar",
|
|
|
@@ -734,6 +734,36 @@
|
|
|
"search": "",
|
|
|
"hash": ""
|
|
|
},
|
|
|
+ {
|
|
|
+ "input": "http://a:b@c\\",
|
|
|
+ "base": null,
|
|
|
+ "href": "http://a:b@c/",
|
|
|
+ "origin": "http://c",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "a",
|
|
|
+ "password": "b",
|
|
|
+ "host": "c",
|
|
|
+ "hostname": "c",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "ws://a@b\\c",
|
|
|
+ "base": null,
|
|
|
+ "href": "ws://a@b/c",
|
|
|
+ "origin": "ws://b",
|
|
|
+ "protocol": "ws:",
|
|
|
+ "username": "a",
|
|
|
+ "password": "",
|
|
|
+ "host": "b",
|
|
|
+ "hostname": "b",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/c",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
{
|
|
|
"input": "foo:/",
|
|
|
"base": "http://example.org/foo/bar",
|
|
|
@@ -1751,6 +1781,76 @@
|
|
|
"search": "",
|
|
|
"hash": ""
|
|
|
},
|
|
|
+ {
|
|
|
+ "input": "file:///w|m",
|
|
|
+ "base": null,
|
|
|
+ "href": "file:///w|m",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/w|m",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "file:///w||m",
|
|
|
+ "base": null,
|
|
|
+ "href": "file:///w||m",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/w||m",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "file:///w|/m",
|
|
|
+ "base": null,
|
|
|
+ "href": "file:///w:/m",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/w:/m",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "file:C|/m/",
|
|
|
+ "base": null,
|
|
|
+ "href": "file:///C:/m/",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/C:/m/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "file:C||/m/",
|
|
|
+ "base": null,
|
|
|
+ "href": "file:///C||/m/",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/C||/m/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
"# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js",
|
|
|
{
|
|
|
"input": "http://example.com/././foo",
|
|
|
@@ -3037,6 +3137,21 @@
|
|
|
"search": "",
|
|
|
"hash": ""
|
|
|
},
|
|
|
+ {
|
|
|
+ "input": "https://example.com/aaa/bbb/%2e%2e?query",
|
|
|
+ "base": null,
|
|
|
+ "href": "https://example.com/aaa/?query",
|
|
|
+ "origin": "https://example.com",
|
|
|
+ "protocol": "https:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "example.com",
|
|
|
+ "hostname": "example.com",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/aaa/",
|
|
|
+ "search": "?query",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
"# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html",
|
|
|
{
|
|
|
"input": "http:@www.example.com",
|
|
|
@@ -3560,6 +3675,34 @@
|
|
|
"search": "",
|
|
|
"hash": ""
|
|
|
},
|
|
|
+ {
|
|
|
+ "input": "file:.",
|
|
|
+ "base": null,
|
|
|
+ "href": "file:///",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "file:.",
|
|
|
+ "base": "http://www.example.com/test",
|
|
|
+ "href": "file:///",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
"# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html",
|
|
|
"Basic canonicalization, uppercase should be converted to lowercase",
|
|
|
{
|
|
|
@@ -3635,6 +3778,126 @@
|
|
|
"search": "",
|
|
|
"hash": ""
|
|
|
},
|
|
|
+ {
|
|
|
+ "input": "non-special:opaque ",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:opaque",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "opaque",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:opaque ?hi",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:opaque %20?hi",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "opaque %20",
|
|
|
+ "search": "?hi",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:opaque #hi",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:opaque %20#hi",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "opaque %20",
|
|
|
+ "search": "",
|
|
|
+ "hash": "#hi"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:opaque x?hi",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:opaque x?hi",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "opaque x",
|
|
|
+ "search": "?hi",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:opaque x#hi",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:opaque x#hi",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "opaque x",
|
|
|
+ "search": "",
|
|
|
+ "hash": "#hi"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:opaque \t\t \t#hi",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:opaque %20#hi",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "opaque %20",
|
|
|
+ "search": "",
|
|
|
+ "hash": "#hi"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:opaque \t\t #hi",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:opaque %20#hi",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "opaque %20",
|
|
|
+ "search": "",
|
|
|
+ "hash": "#hi"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:opaque\t\t \r #hi",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:opaque %20#hi",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "opaque %20",
|
|
|
+ "search": "",
|
|
|
+ "hash": "#hi"
|
|
|
+ },
|
|
|
"Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)",
|
|
|
{
|
|
|
"input": "http://www.foo。bar.com",
|
|
|
@@ -7836,7 +8099,6 @@
|
|
|
"input": "blob:file://host/path",
|
|
|
"base": null,
|
|
|
"href": "blob:file://host/path",
|
|
|
- "origin": "null",
|
|
|
"protocol": "blob:",
|
|
|
"username": "",
|
|
|
"password": "",
|
|
|
@@ -8365,6 +8627,21 @@
|
|
|
"search": "",
|
|
|
"username": ""
|
|
|
},
|
|
|
+ {
|
|
|
+ "input": "non-special:cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
|
|
|
+ "base": null,
|
|
|
+ "hash": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "href": "non-special:cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
|
|
|
+ "origin": "null",
|
|
|
+ "password": "",
|
|
|
+ "pathname": "cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
|
|
|
+ "port": "",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "search": "",
|
|
|
+ "username": ""
|
|
|
+ },
|
|
|
{
|
|
|
"input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment",
|
|
|
"base": null,
|
|
|
@@ -8492,10 +8769,10 @@
|
|
|
"hash": "",
|
|
|
"host": "host",
|
|
|
"hostname": "host",
|
|
|
- "href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
|
|
|
+ "href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]%5E_%60%7B|%7D~",
|
|
|
"origin": "null",
|
|
|
"password": "",
|
|
|
- "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
|
|
|
+ "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]%5E_%60%7B|%7D~",
|
|
|
"port":"",
|
|
|
"protocol": "foo:",
|
|
|
"search": "",
|
|
|
@@ -8507,10 +8784,10 @@
|
|
|
"hash": "",
|
|
|
"host": "host",
|
|
|
"hostname": "host",
|
|
|
- "href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
|
|
|
+ "href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~",
|
|
|
"origin": "wss://host",
|
|
|
"password": "",
|
|
|
- "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
|
|
|
+ "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~",
|
|
|
"port":"",
|
|
|
"protocol": "wss:",
|
|
|
"search": "",
|
|
|
@@ -9515,5 +9792,451 @@
|
|
|
"pathname": "",
|
|
|
"search": "",
|
|
|
"hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "android://x:0/a",
|
|
|
+ "base": null,
|
|
|
+ "href": "android://x:0/a",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "android:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "/a",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "drivefs://x:0/a",
|
|
|
+ "base": null,
|
|
|
+ "href": "drivefs://x:0/a",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "drivefs:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "/a",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "chromeos-steam://x:0/a",
|
|
|
+ "base": null,
|
|
|
+ "href": "chromeos-steam://x:0/a",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "chromeos-steam:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "/a",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "steam://x:0/a",
|
|
|
+ "base": null,
|
|
|
+ "href": "steam://x:0/a",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "steam:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "/a",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "materialized-view://x:0/a",
|
|
|
+ "base": null,
|
|
|
+ "href": "materialized-view://x:0/a",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "materialized-view:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "/a",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "android-app://x:0",
|
|
|
+ "base": null,
|
|
|
+ "href": "android-app://x:0",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "android-app:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "chrome-distiller://x:0",
|
|
|
+ "base": null,
|
|
|
+ "href": "chrome-distiller://x:0",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "chrome-distiller:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "chrome-extension://x:0",
|
|
|
+ "base": null,
|
|
|
+ "href": "chrome-extension://x:0",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "chrome-extension:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "chrome-native://x:0",
|
|
|
+ "base": null,
|
|
|
+ "href": "chrome-native://x:0",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "chrome-native:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "chrome-resource://x:0",
|
|
|
+ "base": null,
|
|
|
+ "href": "chrome-resource://x:0",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "chrome-resource:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "chrome-search://x:0",
|
|
|
+ "base": null,
|
|
|
+ "href": "chrome-search://x:0",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "chrome-search:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "fuchsia-dir://x:0",
|
|
|
+ "base": null,
|
|
|
+ "href": "fuchsia-dir://x:0",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "fuchsia-dir:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "isolated-app://x:0",
|
|
|
+ "base": null,
|
|
|
+ "href": "isolated-app://x:0",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "isolated-app:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "x:0",
|
|
|
+ "hostname": "x",
|
|
|
+ "port": "0",
|
|
|
+ "pathname": "",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ "Scheme relative path starting with multiple slashes",
|
|
|
+ {
|
|
|
+ "input": "///test",
|
|
|
+ "base": "http://example.org/",
|
|
|
+ "href": "http://test/",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "test",
|
|
|
+ "hostname": "test",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "///\\//\\//test",
|
|
|
+ "base": "http://example.org/",
|
|
|
+ "href": "http://test/",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "test",
|
|
|
+ "hostname": "test",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "///example.org/path",
|
|
|
+ "base": "http://example.org/",
|
|
|
+ "href": "http://example.org/path",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "example.org",
|
|
|
+ "hostname": "example.org",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/path",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "///example.org/../path",
|
|
|
+ "base": "http://example.org/",
|
|
|
+ "href": "http://example.org/path",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "example.org",
|
|
|
+ "hostname": "example.org",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/path",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "///example.org/../../",
|
|
|
+ "base": "http://example.org/",
|
|
|
+ "href": "http://example.org/",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "example.org",
|
|
|
+ "hostname": "example.org",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "///example.org/../path/../../",
|
|
|
+ "base": "http://example.org/",
|
|
|
+ "href": "http://example.org/",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "example.org",
|
|
|
+ "hostname": "example.org",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "///example.org/../path/../../path",
|
|
|
+ "base": "http://example.org/",
|
|
|
+ "href": "http://example.org/path",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "example.org",
|
|
|
+ "hostname": "example.org",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/path",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "/\\/\\//example.org/../path",
|
|
|
+ "base": "http://example.org/",
|
|
|
+ "href": "http://example.org/path",
|
|
|
+ "protocol": "http:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "example.org",
|
|
|
+ "hostname": "example.org",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/path",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "///abcdef/../",
|
|
|
+ "base": "file:///",
|
|
|
+ "href": "file:///",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "/\\//\\/a/../",
|
|
|
+ "base": "file:///",
|
|
|
+ "href": "file://////",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "////",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "//a/../",
|
|
|
+ "base": "file:///",
|
|
|
+ "href": "file://a/",
|
|
|
+ "protocol": "file:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "a",
|
|
|
+ "hostname": "a",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ "# Non-special URL and backslashes",
|
|
|
+ {
|
|
|
+ "input": "non-special:\\\\opaque",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:\\\\opaque",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "\\\\opaque",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:\\\\opaque/path",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:\\\\opaque/path",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "\\\\opaque/path",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:\\\\opaque\\path",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:\\\\opaque\\path",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "\\\\opaque\\path",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:\\/opaque",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:\\/opaque",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "\\/opaque",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special:/\\path",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special:/\\path",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "",
|
|
|
+ "hostname": "",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/\\path",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special://host\\a",
|
|
|
+ "base": null,
|
|
|
+ "failure": true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "input": "non-special://host/a\\b",
|
|
|
+ "base": null,
|
|
|
+ "href": "non-special://host/a\\b",
|
|
|
+ "origin": "null",
|
|
|
+ "protocol": "non-special:",
|
|
|
+ "username": "",
|
|
|
+ "password": "",
|
|
|
+ "host": "host",
|
|
|
+ "hostname": "host",
|
|
|
+ "port": "",
|
|
|
+ "pathname": "/a\\b",
|
|
|
+ "search": "",
|
|
|
+ "hash": ""
|
|
|
}
|
|
|
]
|