URL test results
Test
Input
Base
Notes
0
"http://example\t.\norg"
http://example.org/foo/bar
1
"http://user:pass@foo:21/bar;par?b#c"
http://example.org/foo/bar
2
"http:foo.com"
http://example.org/foo/bar
3
"\t :foo.com \n"
http://example.org/foo/bar
4
" foo.com "
http://example.org/foo/bar
5
"a:\t foo.com"
http://example.org/foo/bar
6
"http://f:21/ b ? d # e "
http://example.org/foo/bar
7
"http://f:/c"
http://example.org/foo/bar
8
"http://f:0/c"
http://example.org/foo/bar
9
"http://f:00000000000000/c"
http://example.org/foo/bar
10
"http://f:00000000000000000000080/c"
http://example.org/foo/bar
11
"http://f:b/c"
http://example.org/foo/bar
href
12
"http://f: /c"
http://example.org/foo/bar
href
13
"http://f:\n/c"
http://example.org/foo/bar
14
"http://f:fifty-two/c"
http://example.org/foo/bar
href
15
"http://f:999999/c"
http://example.org/foo/bar
16
"http://f: 21 / b ? d # e "
http://example.org/foo/bar
href
17
""
http://example.org/foo/bar
18
" \t"
http://example.org/foo/bar
19
":foo.com/"
http://example.org/foo/bar
20
":foo.com\\"
http://example.org/foo/bar
21
":"
http://example.org/foo/bar
22
":a"
http://example.org/foo/bar
23
":/"
http://example.org/foo/bar
24
":\\"
http://example.org/foo/bar
25
":#"
http://example.org/foo/bar
26
"?"
http://example.org/foo/bar
27
"/"
http://example.org/foo/bar
28
":23"
http://example.org/foo/bar
29
"/:23"
http://example.org/foo/bar
30
"::"
http://example.org/foo/bar
31
"::23"
http://example.org/foo/bar
32
"foo://"
http://example.org/foo/bar
33
"http://a:b@c:29/d"
http://example.org/foo/bar
34
"http::@c:29"
http://example.org/foo/bar
35
"http://&a:foo(b]c@d:2/"
http://example.org/foo/bar
36
"http://::@c@d:2"
http://example.org/foo/bar
37
"http://foo.com:b@d/"
http://example.org/foo/bar
38
"http://foo.com/\\@"
http://example.org/foo/bar
39
"http:\\\\foo.com\\"
http://example.org/foo/bar
40
"http:\\\\a\\b:c\\d@foo.com\\"
http://example.org/foo/bar
41
"foo:/"
http://example.org/foo/bar
42
"foo:/bar.com/"
http://example.org/foo/bar
43
"foo://///////"
http://example.org/foo/bar
44
"foo://///////bar.com/"
http://example.org/foo/bar
45
"foo:////://///"
http://example.org/foo/bar
46
"c:/foo"
http://example.org/foo/bar
47
"//foo/bar"
http://example.org/foo/bar
48
"http://foo/path;a??e#f#g"
http://example.org/foo/bar
49
"http://foo/abcd?efgh?ijkl"
http://example.org/foo/bar
50
"http://foo/abcd#foo?bar"
http://example.org/foo/bar
51
"[61:24:74]:98"
http://example.org/foo/bar
52
"http:[61:27]/:foo"
http://example.org/foo/bar
53
"http://[1::2]:3:4"
http://example.org/foo/bar
href
54
"http://2001::1"
http://example.org/foo/bar
href
55
"http://2001::1]"
http://example.org/foo/bar
href
56
"http://2001::1]:80"
http://example.org/foo/bar
href
57
"http://[2001::1]"
http://example.org/foo/bar
58
"http://[2001::1]:80"
http://example.org/foo/bar
59
"http:/example.com/"
http://example.org/foo/bar
60
"ftp:/example.com/"
http://example.org/foo/bar
61
"https:/example.com/"
http://example.org/foo/bar
62
"madeupscheme:/example.com/"
http://example.org/foo/bar
63
"file:/example.com/"
http://example.org/foo/bar
64
"ftps:/example.com/"
http://example.org/foo/bar
65
"gopher:/example.com/"
http://example.org/foo/bar
66
"ws:/example.com/"
http://example.org/foo/bar
67
"wss:/example.com/"
http://example.org/foo/bar
68
"data:/example.com/"
http://example.org/foo/bar
69
"javascript:/example.com/"
http://example.org/foo/bar
70
"mailto:/example.com/"
http://example.org/foo/bar
71
"http:example.com/"
http://example.org/foo/bar
72
"ftp:example.com/"
http://example.org/foo/bar
73
"https:example.com/"
http://example.org/foo/bar
74
"madeupscheme:example.com/"
http://example.org/foo/bar
75
"ftps:example.com/"
http://example.org/foo/bar
76
"gopher:example.com/"
http://example.org/foo/bar
77
"ws:example.com/"
http://example.org/foo/bar
78
"wss:example.com/"
http://example.org/foo/bar
79
"data:example.com/"
http://example.org/foo/bar
80
"javascript:example.com/"
http://example.org/foo/bar
81
"mailto:example.com/"
http://example.org/foo/bar
82
"/a/b/c"
http://example.org/foo/bar
83
"/a/ /c"
http://example.org/foo/bar
84
"/a%2fc"
http://example.org/foo/bar
85
"/a/%2f/c"
http://example.org/foo/bar
86
"data:text/html,test#test"
http://example.org/foo/bar
87
"file:c:\\foo\\bar.html"
file:///tmp/mock/path
88
" File:c|////foo\\bar.html"
file:///tmp/mock/path
89
"C|/foo/bar"
file:///tmp/mock/path
90
"/C|\\foo\\bar"
file:///tmp/mock/path
91
"//C|/foo/bar"
file:///tmp/mock/path
92
"//server/file"
file:///tmp/mock/path
93
"\\\\server\\file"
file:///tmp/mock/path
94
"/\\server/file"
file:///tmp/mock/path
95
"file:///foo/bar.txt"
file:///tmp/mock/path
96
"file:///home/me"
file:///tmp/mock/path
97
"//"
file:///tmp/mock/path
98
"///"
file:///tmp/mock/path
99
"///test"
file:///tmp/mock/path
100
"file://test"
file:///tmp/mock/path
101
"file://localhost"
file:///tmp/mock/path
102
"file://localhost/"
file:///tmp/mock/path
103
"file://localhost/test"
file:///tmp/mock/path
104
"test"
file:///tmp/mock/path
105
"file:test"
file:///tmp/mock/path
106
"http://example.com/././foo"
about:blank
107
"http://example.com/./.foo"
about:blank
108
"http://example.com/foo/."
about:blank
109
"http://example.com/foo/./"
about:blank
110
"http://example.com/foo/bar/.."
about:blank
111
"http://example.com/foo/bar/../"
about:blank
112
"http://example.com/foo/..bar"
about:blank
113
"http://example.com/foo/bar/../ton"
about:blank
114
"http://example.com/foo/bar/../ton/../../a"
about:blank
115
"http://example.com/foo/../../.."
about:blank
116
"http://example.com/foo/../../../ton"
about:blank
117
"http://example.com/foo/%2e"
about:blank
118
"http://example.com/foo/%2e%2"
about:blank
119
"http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar"
about:blank
120
"http://example.com////../.."
about:blank
121
"http://example.com/foo/bar//../.."
about:blank
122
"http://example.com/foo/bar//.."
about:blank
123
"http://example.com/foo"
about:blank
124
"http://example.com/%20foo"
about:blank
125
"http://example.com/foo%"
about:blank
126
"http://example.com/foo%2"
about:blank
127
"http://example.com/foo%2zbar"
about:blank
128
"http://example.com/foo%2©zbar"
about:blank
129
"http://example.com/foo%41%7a"
about:blank
130
"http://example.com/foo\t\u0091%91"
about:blank
131
"http://example.com/foo%00%51"
about:blank
132
"http://example.com/(%28:%3A%29)"
about:blank
133
"http://example.com/%3A%3a%3C%3c"
about:blank
134
"http://example.com/foo\tbar"
about:blank
135
"http://example.com\\\\foo\\\\bar"
about:blank
136
"http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd"
about:blank
137
"http://example.com/@asdf%40"
about:blank
138
"http://example.com/你好你好"
about:blank
139
"http://example.com/‥/foo"
about:blank
140
"http://example.com//foo"
about:blank
141
"http://example.com//foo//bar"
about:blank
142
"http://www.google.com/foo?bar=baz#"
about:blank
143
"http://www.google.com/foo?bar=baz# »"
about:blank
144
"http://[www.google.com]/"
about:blank
href
145
"http://www.google.com"
about:blank
146
"http://192.0x00A80001"
about:blank
147
"http://www/foo%2Ehtml"
about:blank
148
"http://www/foo/%2E/html"
about:blank
149
"http://user:pass@/"
about:blank
href
150
"http://%25DOMAIN:foobar@foodomain.com/"
about:blank
151
"http:\\\\www.google.com\\foo"
about:blank
152
"http://foo:80/"
about:blank
153
"http://foo:81/"
about:blank
154
"httpa://foo:80/"
about:blank
155
"http://foo:-80/"
about:blank
href
156
"https://foo:443/"
about:blank
157
"https://foo:80/"
about:blank
158
"ftp://foo:21/"
about:blank
159
"ftp://foo:80/"
about:blank
160
"gopher://foo:70/"
about:blank
161
"gopher://foo:443/"
about:blank
162
"ws://foo:80/"
about:blank
163
"ws://foo:81/"
about:blank
164
"ws://foo:443/"
about:blank
165
"ws://foo:815/"
about:blank
166
"wss://foo:80/"
about:blank
167
"wss://foo:81/"
about:blank
168
"wss://foo:443/"
about:blank
169
"wss://foo:815/"
about:blank
170
"http:/example.com/"
about:blank
171
"ftp:/example.com/"
about:blank
172
"https:/example.com/"
about:blank
173
"madeupscheme:/example.com/"
about:blank
174
"file:/example.com/"
about:blank
175
"ftps:/example.com/"
about:blank
176
"gopher:/example.com/"
about:blank
177
"ws:/example.com/"
about:blank
178
"wss:/example.com/"
about:blank
179
"data:/example.com/"
about:blank
180
"javascript:/example.com/"
about:blank
181
"mailto:/example.com/"
about:blank
182
"http:example.com/"
about:blank
183
"ftp:example.com/"
about:blank
184
"https:example.com/"
about:blank
185
"madeupscheme:example.com/"
about:blank
186
"ftps:example.com/"
about:blank
187
"gopher:example.com/"
about:blank
188
"ws:example.com/"
about:blank
189
"wss:example.com/"
about:blank
190
"data:example.com/"
about:blank
191
"javascript:example.com/"
about:blank
192
"mailto:example.com/"
about:blank
193
"http:@www.example.com"
about:blank
194
"http:/@www.example.com"
about:blank
195
"http://@www.example.com"
about:blank
196
"http:a:b@www.example.com"
about:blank
197
"http:/a:b@www.example.com"
about:blank
198
"http://a:b@www.example.com"
about:blank
199
"http://@pple.com"
about:blank
200
"http::b@www.example.com"
about:blank
201
"http:/:b@www.example.com"
about:blank
202
"http://:b@www.example.com"
about:blank
203
"http:/:@/www.example.com"
about:blank
href
204
"http://user@/www.example.com"
about:blank
href
205
"http:@/www.example.com"
about:blank
href
206
"http:/@/www.example.com"
about:blank
href
207
"http://@/www.example.com"
about:blank
href
208
"https:@/www.example.com"
about:blank
href
209
"http:a:b@/www.example.com"
about:blank
href
210
"http:/a:b@/www.example.com"
about:blank
href
211
"http://a:b@/www.example.com"
about:blank
href
212
"http::@/www.example.com"
about:blank
href
213
"http:a:@www.example.com"
about:blank
214
"http:/a:@www.example.com"
about:blank
215
"http://a:@www.example.com"
about:blank
216
"http://www.@pple.com"
about:blank
217
"http:@:www.example.com"
about:blank
href
218
"http:/@:www.example.com"
about:blank
href
219
"http://@:www.example.com"
about:blank
href
220
"http://:@www.example.com"
about:blank
221
"/"
http://www.example.com/test
222
"/test.txt"
http://www.example.com/test
223
"."
http://www.example.com/test
224
".."
http://www.example.com/test
225
"test.txt"
http://www.example.com/test
226
"./test.txt"
http://www.example.com/test
227
"../test.txt"
http://www.example.com/test
228
"../aaa/test.txt"
http://www.example.com/test
229
"../../test.txt"
http://www.example.com/test
230
"中/test.txt"
http://www.example.com/test
231
"http://www.example2.com"
http://www.example.com/test
232
"http://ExAmPlE.CoM"
http://other.com/
233
"http://example example.com"
http://other.com/
href
234
"http://Goo%20 goo%7C|.com"
http://other.com/
href
235
"http://GOO goo.com"
http://other.com/
href
236
"http://GOOgoo.com"
http://other.com/
href hostname
237
"http://www.foo。bar.com"
http://other.com/
href hostname
238
"http://\uFDD0zyx.com"
http://other.com/
href protocol hostname pathname
239
"http://%ef%b7%90zyx.com"
http://other.com/
href
240
"http://Go.com"
http://other.com/
href hostname
241
"http://%41.com"
http://other.com/
href
242
"http://%ef%bc%85%ef%bc%94%ef%bc%91.com"
http://other.com/
href
243
"http://%00.com"
http://other.com/
href
244
"http://%ef%bc%85%ef%bc%90%ef%bc%90.com"
http://other.com/
href
245
"http://你好你好"
http://other.com/
246
"http://%zz%66%a.com"
http://other.com/
href
247
"http://%25"
http://other.com/
href
248
"http://hello%00"
http://other.com/
href protocol hostname pathname
249
"http://%30%78%63%30%2e%30%32%35%30.01"
http://other.com/
href hostname
250
"http://%30%78%63%30%2e%30%32%35%30.01%2e"
http://other.com/
href protocol hostname pathname
251
"http://%3g%78%63%30%2e%30%32%35%30%2E.01"
http://other.com/
href
252
"http://192.168.0.1 hello"
http://other.com/
href
253
"http://0Xc0.0250.01"
http://other.com/
href hostname
254
"http://192.168.0.257"
http://other.com/
href protocol hostname pathname
255
"http://[google.com]"
http://other.com/
href