| 1 | [ |
| 2 | "# Pulled from https://github.com/web-platform-tests/wpt/blob/befe66343e5f21dc464c8c772c6d20695936714f/url/resources/urltestdata.json", |
| 3 | { |
| 4 | "input": "http://example\t.\norg", |
| 5 | "base": "http://example.org/foo/bar", |
| 6 | "href": "http://example.org/", |
| 7 | "origin": "http://example.org", |
| 8 | "protocol": "http:", |
| 9 | "username": "", |
| 10 | "password": "", |
| 11 | "host": "example.org", |
| 12 | "hostname": "example.org", |
| 13 | "port": "", |
| 14 | "pathname": "/", |
| 15 | "search": "", |
| 16 | "hash": "" |
| 17 | }, |
| 18 | { |
| 19 | "input": "http://user:pass@foo:21/bar;par?b#c", |
| 20 | "base": "http://example.org/foo/bar", |
| 21 | "href": "http://user:pass@foo:21/bar;par?b#c", |
| 22 | "origin": "http://foo:21", |
| 23 | "protocol": "http:", |
| 24 | "username": "user", |
| 25 | "password": "pass", |
| 26 | "host": "foo:21", |
| 27 | "hostname": "foo", |
| 28 | "port": "21", |
| 29 | "pathname": "/bar;par", |
| 30 | "search": "?b", |
| 31 | "hash": "#c" |
| 32 | }, |
| 33 | { |
| 34 | "input": "https://test:@test", |
| 35 | "base": null, |
| 36 | "href": "https://test@test/", |
| 37 | "origin": "https://test", |
| 38 | "protocol": "https:", |
| 39 | "username": "test", |
| 40 | "password": "", |
| 41 | "host": "test", |
| 42 | "hostname": "test", |
| 43 | "port": "", |
| 44 | "pathname": "/", |
| 45 | "search": "", |
| 46 | "hash": "" |
| 47 | }, |
| 48 | { |
| 49 | "input": "https://:@test", |
| 50 | "base": null, |
| 51 | "href": "https://test/", |
| 52 | "origin": "https://test", |
| 53 | "protocol": "https:", |
| 54 | "username": "", |
| 55 | "password": "", |
| 56 | "host": "test", |
| 57 | "hostname": "test", |
| 58 | "port": "", |
| 59 | "pathname": "/", |
| 60 | "search": "", |
| 61 | "hash": "" |
| 62 | }, |
| 63 | { |
| 64 | "input": "non-special://test:@test/x", |
| 65 | "base": null, |
| 66 | "href": "non-special://test@test/x", |
| 67 | "origin": "null", |
| 68 | "protocol": "non-special:", |
| 69 | "username": "test", |
| 70 | "password": "", |
| 71 | "host": "test", |
| 72 | "hostname": "test", |
| 73 | "port": "", |
| 74 | "pathname": "/x", |
| 75 | "search": "", |
| 76 | "hash": "" |
| 77 | }, |
| 78 | { |
| 79 | "input": "non-special://:@test/x", |
| 80 | "base": null, |
| 81 | "href": "non-special://test/x", |
| 82 | "origin": "null", |
| 83 | "protocol": "non-special:", |
| 84 | "username": "", |
| 85 | "password": "", |
| 86 | "host": "test", |
| 87 | "hostname": "test", |
| 88 | "port": "", |
| 89 | "pathname": "/x", |
| 90 | "search": "", |
| 91 | "hash": "" |
| 92 | }, |
| 93 | { |
| 94 | "input": "http:foo.com", |
| 95 | "base": "http://example.org/foo/bar", |
| 96 | "href": "http://example.org/foo/foo.com", |
| 97 | "origin": "http://example.org", |
| 98 | "protocol": "http:", |
| 99 | "username": "", |
| 100 | "password": "", |
| 101 | "host": "example.org", |
| 102 | "hostname": "example.org", |
| 103 | "port": "", |
| 104 | "pathname": "/foo/foo.com", |
| 105 | "search": "", |
| 106 | "hash": "" |
| 107 | }, |
| 108 | { |
| 109 | "input": "\t :foo.com \n", |
| 110 | "base": "http://example.org/foo/bar", |
| 111 | "href": "http://example.org/foo/:foo.com", |
| 112 | "origin": "http://example.org", |
| 113 | "protocol": "http:", |
| 114 | "username": "", |
| 115 | "password": "", |
| 116 | "host": "example.org", |
| 117 | "hostname": "example.org", |
| 118 | "port": "", |
| 119 | "pathname": "/foo/:foo.com", |
| 120 | "search": "", |
| 121 | "hash": "" |
| 122 | }, |
| 123 | { |
| 124 | "input": " foo.com ", |
| 125 | "base": "http://example.org/foo/bar", |
| 126 | "href": "http://example.org/foo/foo.com", |
| 127 | "origin": "http://example.org", |
| 128 | "protocol": "http:", |
| 129 | "username": "", |
| 130 | "password": "", |
| 131 | "host": "example.org", |
| 132 | "hostname": "example.org", |
| 133 | "port": "", |
| 134 | "pathname": "/foo/foo.com", |
| 135 | "search": "", |
| 136 | "hash": "" |
| 137 | }, |
| 138 | { |
| 139 | "input": "a:\t foo.com", |
| 140 | "base": "http://example.org/foo/bar", |
| 141 | "href": "a: foo.com", |
| 142 | "origin": "null", |
| 143 | "protocol": "a:", |
| 144 | "username": "", |
| 145 | "password": "", |
| 146 | "host": "", |
| 147 | "hostname": "", |
| 148 | "port": "", |
| 149 | "pathname": " foo.com", |
| 150 | "search": "", |
| 151 | "hash": "" |
| 152 | }, |
| 153 | { |
| 154 | "input": "http://f:21/ b ? d # e ", |
| 155 | "base": "http://example.org/foo/bar", |
| 156 | "href": "http://f:21/%20b%20?%20d%20#%20e", |
| 157 | "origin": "http://f:21", |
| 158 | "protocol": "http:", |
| 159 | "username": "", |
| 160 | "password": "", |
| 161 | "host": "f:21", |
| 162 | "hostname": "f", |
| 163 | "port": "21", |
| 164 | "pathname": "/%20b%20", |
| 165 | "search": "?%20d%20", |
| 166 | "hash": "#%20e" |
| 167 | }, |
| 168 | { |
| 169 | "input": "lolscheme:x x#x x", |
| 170 | "base": null, |
| 171 | "href": "lolscheme:x x#x%20x", |
| 172 | "protocol": "lolscheme:", |
| 173 | "username": "", |
| 174 | "password": "", |
| 175 | "host": "", |
| 176 | "hostname": "", |
| 177 | "port": "", |
| 178 | "pathname": "x x", |
| 179 | "search": "", |
| 180 | "hash": "#x%20x" |
| 181 | }, |
| 182 | { |
| 183 | "input": "http://f:/c", |
| 184 | "base": "http://example.org/foo/bar", |
| 185 | "href": "http://f/c", |
| 186 | "origin": "http://f", |
| 187 | "protocol": "http:", |
| 188 | "username": "", |
| 189 | "password": "", |
| 190 | "host": "f", |
| 191 | "hostname": "f", |
| 192 | "port": "", |
| 193 | "pathname": "/c", |
| 194 | "search": "", |
| 195 | "hash": "" |
| 196 | }, |
| 197 | { |
| 198 | "input": "http://f:0/c", |
| 199 | "base": "http://example.org/foo/bar", |
| 200 | "href": "http://f:0/c", |
| 201 | "origin": "http://f:0", |
| 202 | "protocol": "http:", |
| 203 | "username": "", |
| 204 | "password": "", |
| 205 | "host": "f:0", |
| 206 | "hostname": "f", |
| 207 | "port": "0", |
| 208 | "pathname": "/c", |
| 209 | "search": "", |
| 210 | "hash": "" |
| 211 | }, |
| 212 | { |
| 213 | "input": "http://f:00000000000000/c", |
| 214 | "base": "http://example.org/foo/bar", |
| 215 | "href": "http://f:0/c", |
| 216 | "origin": "http://f:0", |
| 217 | "protocol": "http:", |
| 218 | "username": "", |
| 219 | "password": "", |
| 220 | "host": "f:0", |
| 221 | "hostname": "f", |
| 222 | "port": "0", |
| 223 | "pathname": "/c", |
| 224 | "search": "", |
| 225 | "hash": "" |
| 226 | }, |
| 227 | { |
| 228 | "input": "http://f:00000000000000000000080/c", |
| 229 | "base": "http://example.org/foo/bar", |
| 230 | "href": "http://f/c", |
| 231 | "origin": "http://f", |
| 232 | "protocol": "http:", |
| 233 | "username": "", |
| 234 | "password": "", |
| 235 | "host": "f", |
| 236 | "hostname": "f", |
| 237 | "port": "", |
| 238 | "pathname": "/c", |
| 239 | "search": "", |
| 240 | "hash": "" |
| 241 | }, |
| 242 | { |
| 243 | "input": "http://f:b/c", |
| 244 | "base": "http://example.org/foo/bar", |
| 245 | "failure": true |
| 246 | }, |
| 247 | { |
| 248 | "input": "http://f: /c", |
| 249 | "base": "http://example.org/foo/bar", |
| 250 | "failure": true |
| 251 | }, |
| 252 | { |
| 253 | "input": "http://f:\n/c", |
| 254 | "base": "http://example.org/foo/bar", |
| 255 | "href": "http://f/c", |
| 256 | "origin": "http://f", |
| 257 | "protocol": "http:", |
| 258 | "username": "", |
| 259 | "password": "", |
| 260 | "host": "f", |
| 261 | "hostname": "f", |
| 262 | "port": "", |
| 263 | "pathname": "/c", |
| 264 | "search": "", |
| 265 | "hash": "" |
| 266 | }, |
| 267 | { |
| 268 | "input": "http://f:fifty-two/c", |
| 269 | "base": "http://example.org/foo/bar", |
| 270 | "failure": true |
| 271 | }, |
| 272 | { |
| 273 | "input": "http://f:999999/c", |
| 274 | "base": "http://example.org/foo/bar", |
| 275 | "failure": true |
| 276 | }, |
| 277 | { |
| 278 | "input": "non-special://f:999999/c", |
| 279 | "base": "http://example.org/foo/bar", |
| 280 | "failure": true |
| 281 | }, |
| 282 | { |
| 283 | "input": "http://f: 21 / b ? d # e ", |
| 284 | "base": "http://example.org/foo/bar", |
| 285 | "failure": true |
| 286 | }, |
| 287 | { |
| 288 | "input": "", |
| 289 | "base": "http://example.org/foo/bar", |
| 290 | "href": "http://example.org/foo/bar", |
| 291 | "origin": "http://example.org", |
| 292 | "protocol": "http:", |
| 293 | "username": "", |
| 294 | "password": "", |
| 295 | "host": "example.org", |
| 296 | "hostname": "example.org", |
| 297 | "port": "", |
| 298 | "pathname": "/foo/bar", |
| 299 | "search": "", |
| 300 | "hash": "" |
| 301 | }, |
| 302 | { |
| 303 | "input": " \t", |
| 304 | "base": "http://example.org/foo/bar", |
| 305 | "href": "http://example.org/foo/bar", |
| 306 | "origin": "http://example.org", |
| 307 | "protocol": "http:", |
| 308 | "username": "", |
| 309 | "password": "", |
| 310 | "host": "example.org", |
| 311 | "hostname": "example.org", |
| 312 | "port": "", |
| 313 | "pathname": "/foo/bar", |
| 314 | "search": "", |
| 315 | "hash": "" |
| 316 | }, |
| 317 | { |
| 318 | "input": ":foo.com/", |
| 319 | "base": "http://example.org/foo/bar", |
| 320 | "href": "http://example.org/foo/:foo.com/", |
| 321 | "origin": "http://example.org", |
| 322 | "protocol": "http:", |
| 323 | "username": "", |
| 324 | "password": "", |
| 325 | "host": "example.org", |
| 326 | "hostname": "example.org", |
| 327 | "port": "", |
| 328 | "pathname": "/foo/:foo.com/", |
| 329 | "search": "", |
| 330 | "hash": "" |
| 331 | }, |
| 332 | { |
| 333 | "input": ":foo.com\\", |
| 334 | "base": "http://example.org/foo/bar", |
| 335 | "href": "http://example.org/foo/:foo.com/", |
| 336 | "origin": "http://example.org", |
| 337 | "protocol": "http:", |
| 338 | "username": "", |
| 339 | "password": "", |
| 340 | "host": "example.org", |
| 341 | "hostname": "example.org", |
| 342 | "port": "", |
| 343 | "pathname": "/foo/:foo.com/", |
| 344 | "search": "", |
| 345 | "hash": "" |
| 346 | }, |
| 347 | { |
| 348 | "input": ":", |
| 349 | "base": "http://example.org/foo/bar", |
| 350 | "href": "http://example.org/foo/:", |
| 351 | "origin": "http://example.org", |
| 352 | "protocol": "http:", |
| 353 | "username": "", |
| 354 | "password": "", |
| 355 | "host": "example.org", |
| 356 | "hostname": "example.org", |
| 357 | "port": "", |
| 358 | "pathname": "/foo/:", |
| 359 | "search": "", |
| 360 | "hash": "" |
| 361 | }, |
| 362 | { |
| 363 | "input": ":a", |
| 364 | "base": "http://example.org/foo/bar", |
| 365 | "href": "http://example.org/foo/:a", |
| 366 | "origin": "http://example.org", |
| 367 | "protocol": "http:", |
| 368 | "username": "", |
| 369 | "password": "", |
| 370 | "host": "example.org", |
| 371 | "hostname": "example.org", |
| 372 | "port": "", |
| 373 | "pathname": "/foo/:a", |
| 374 | "search": "", |
| 375 | "hash": "" |
| 376 | }, |
| 377 | { |
| 378 | "input": ":/", |
| 379 | "base": "http://example.org/foo/bar", |
| 380 | "href": "http://example.org/foo/:/", |
| 381 | "origin": "http://example.org", |
| 382 | "protocol": "http:", |
| 383 | "username": "", |
| 384 | "password": "", |
| 385 | "host": "example.org", |
| 386 | "hostname": "example.org", |
| 387 | "port": "", |
| 388 | "pathname": "/foo/:/", |
| 389 | "search": "", |
| 390 | "hash": "" |
| 391 | }, |
| 392 | { |
| 393 | "input": ":\\", |
| 394 | "base": "http://example.org/foo/bar", |
| 395 | "href": "http://example.org/foo/:/", |
| 396 | "origin": "http://example.org", |
| 397 | "protocol": "http:", |
| 398 | "username": "", |
| 399 | "password": "", |
| 400 | "host": "example.org", |
| 401 | "hostname": "example.org", |
| 402 | "port": "", |
| 403 | "pathname": "/foo/:/", |
| 404 | "search": "", |
| 405 | "hash": "" |
| 406 | }, |
| 407 | { |
| 408 | "input": ":#", |
| 409 | "base": "http://example.org/foo/bar", |
| 410 | "href": "http://example.org/foo/:#", |
| 411 | "origin": "http://example.org", |
| 412 | "protocol": "http:", |
| 413 | "username": "", |
| 414 | "password": "", |
| 415 | "host": "example.org", |
| 416 | "hostname": "example.org", |
| 417 | "port": "", |
| 418 | "pathname": "/foo/:", |
| 419 | "search": "", |
| 420 | "hash": "" |
| 421 | }, |
| 422 | { |
| 423 | "input": "#", |
| 424 | "base": "http://example.org/foo/bar", |
| 425 | "href": "http://example.org/foo/bar#", |
| 426 | "origin": "http://example.org", |
| 427 | "protocol": "http:", |
| 428 | "username": "", |
| 429 | "password": "", |
| 430 | "host": "example.org", |
| 431 | "hostname": "example.org", |
| 432 | "port": "", |
| 433 | "pathname": "/foo/bar", |
| 434 | "search": "", |
| 435 | "hash": "" |
| 436 | }, |
| 437 | { |
| 438 | "input": "#/", |
| 439 | "base": "http://example.org/foo/bar", |
| 440 | "href": "http://example.org/foo/bar#/", |
| 441 | "origin": "http://example.org", |
| 442 | "protocol": "http:", |
| 443 | "username": "", |
| 444 | "password": "", |
| 445 | "host": "example.org", |
| 446 | "hostname": "example.org", |
| 447 | "port": "", |
| 448 | "pathname": "/foo/bar", |
| 449 | "search": "", |
| 450 | "hash": "#/" |
| 451 | }, |
| 452 | { |
| 453 | "input": "#\\", |
| 454 | "base": "http://example.org/foo/bar", |
| 455 | "href": "http://example.org/foo/bar#\\", |
| 456 | "origin": "http://example.org", |
| 457 | "protocol": "http:", |
| 458 | "username": "", |
| 459 | "password": "", |
| 460 | "host": "example.org", |
| 461 | "hostname": "example.org", |
| 462 | "port": "", |
| 463 | "pathname": "/foo/bar", |
| 464 | "search": "", |
| 465 | "hash": "#\\" |
| 466 | }, |
| 467 | { |
| 468 | "input": "#;?", |
| 469 | "base": "http://example.org/foo/bar", |
| 470 | "href": "http://example.org/foo/bar#;?", |
| 471 | "origin": "http://example.org", |
| 472 | "protocol": "http:", |
| 473 | "username": "", |
| 474 | "password": "", |
| 475 | "host": "example.org", |
| 476 | "hostname": "example.org", |
| 477 | "port": "", |
| 478 | "pathname": "/foo/bar", |
| 479 | "search": "", |
| 480 | "hash": "#;?" |
| 481 | }, |
| 482 | { |
| 483 | "input": "?", |
| 484 | "base": "http://example.org/foo/bar", |
| 485 | "href": "http://example.org/foo/bar?", |
| 486 | "origin": "http://example.org", |
| 487 | "protocol": "http:", |
| 488 | "username": "", |
| 489 | "password": "", |
| 490 | "host": "example.org", |
| 491 | "hostname": "example.org", |
| 492 | "port": "", |
| 493 | "pathname": "/foo/bar", |
| 494 | "search": "", |
| 495 | "hash": "" |
| 496 | }, |
| 497 | { |
| 498 | "input": "/", |
| 499 | "base": "http://example.org/foo/bar", |
| 500 | "href": "http://example.org/", |
| 501 | "origin": "http://example.org", |
| 502 | "protocol": "http:", |
| 503 | "username": "", |
| 504 | "password": "", |
| 505 | "host": "example.org", |
| 506 | "hostname": "example.org", |
| 507 | "port": "", |
| 508 | "pathname": "/", |
| 509 | "search": "", |
| 510 | "hash": "" |
| 511 | }, |
| 512 | { |
| 513 | "input": ":23", |
| 514 | "base": "http://example.org/foo/bar", |
| 515 | "href": "http://example.org/foo/:23", |
| 516 | "origin": "http://example.org", |
| 517 | "protocol": "http:", |
| 518 | "username": "", |
| 519 | "password": "", |
| 520 | "host": "example.org", |
| 521 | "hostname": "example.org", |
| 522 | "port": "", |
| 523 | "pathname": "/foo/:23", |
| 524 | "search": "", |
| 525 | "hash": "" |
| 526 | }, |
| 527 | { |
| 528 | "input": "/:23", |
| 529 | "base": "http://example.org/foo/bar", |
| 530 | "href": "http://example.org/:23", |
| 531 | "origin": "http://example.org", |
| 532 | "protocol": "http:", |
| 533 | "username": "", |
| 534 | "password": "", |
| 535 | "host": "example.org", |
| 536 | "hostname": "example.org", |
| 537 | "port": "", |
| 538 | "pathname": "/:23", |
| 539 | "search": "", |
| 540 | "hash": "" |
| 541 | }, |
| 542 | { |
| 543 | "input": "\\x", |
| 544 | "base": "http://example.org/foo/bar", |
| 545 | "href": "http://example.org/x", |
| 546 | "origin": "http://example.org", |
| 547 | "protocol": "http:", |
| 548 | "username": "", |
| 549 | "password": "", |
| 550 | "host": "example.org", |
| 551 | "hostname": "example.org", |
| 552 | "port": "", |
| 553 | "pathname": "/x", |
| 554 | "search": "", |
| 555 | "hash": "" |
| 556 | }, |
| 557 | { |
| 558 | "input": "\\\\x\\hello", |
| 559 | "base": "http://example.org/foo/bar", |
| 560 | "href": "http://x/hello", |
| 561 | "origin": "http://x", |
| 562 | "protocol": "http:", |
| 563 | "username": "", |
| 564 | "password": "", |
| 565 | "host": "x", |
| 566 | "hostname": "x", |
| 567 | "port": "", |
| 568 | "pathname": "/hello", |
| 569 | "search": "", |
| 570 | "hash": "" |
| 571 | }, |
| 572 | { |
| 573 | "input": "::", |
| 574 | "base": "http://example.org/foo/bar", |
| 575 | "href": "http://example.org/foo/::", |
| 576 | "origin": "http://example.org", |
| 577 | "protocol": "http:", |
| 578 | "username": "", |
| 579 | "password": "", |
| 580 | "host": "example.org", |
| 581 | "hostname": "example.org", |
| 582 | "port": "", |
| 583 | "pathname": "/foo/::", |
| 584 | "search": "", |
| 585 | "hash": "" |
| 586 | }, |
| 587 | { |
| 588 | "input": "::23", |
| 589 | "base": "http://example.org/foo/bar", |
| 590 | "href": "http://example.org/foo/::23", |
| 591 | "origin": "http://example.org", |
| 592 | "protocol": "http:", |
| 593 | "username": "", |
| 594 | "password": "", |
| 595 | "host": "example.org", |
| 596 | "hostname": "example.org", |
| 597 | "port": "", |
| 598 | "pathname": "/foo/::23", |
| 599 | "search": "", |
| 600 | "hash": "" |
| 601 | }, |
| 602 | { |
| 603 | "input": "foo://", |
| 604 | "base": "http://example.org/foo/bar", |
| 605 | "href": "foo://", |
| 606 | "origin": "null", |
| 607 | "protocol": "foo:", |
| 608 | "username": "", |
| 609 | "password": "", |
| 610 | "host": "", |
| 611 | "hostname": "", |
| 612 | "port": "", |
| 613 | "pathname": "", |
| 614 | "search": "", |
| 615 | "hash": "" |
| 616 | }, |
| 617 | { |
| 618 | "input": "http://a:b@c:29/d", |
| 619 | "base": "http://example.org/foo/bar", |
| 620 | "href": "http://a:b@c:29/d", |
| 621 | "origin": "http://c:29", |
| 622 | "protocol": "http:", |
| 623 | "username": "a", |
| 624 | "password": "b", |
| 625 | "host": "c:29", |
| 626 | "hostname": "c", |
| 627 | "port": "29", |
| 628 | "pathname": "/d", |
| 629 | "search": "", |
| 630 | "hash": "" |
| 631 | }, |
| 632 | { |
| 633 | "input": "http::@c:29", |
| 634 | "base": "http://example.org/foo/bar", |
| 635 | "href": "http://example.org/foo/:@c:29", |
| 636 | "origin": "http://example.org", |
| 637 | "protocol": "http:", |
| 638 | "username": "", |
| 639 | "password": "", |
| 640 | "host": "example.org", |
| 641 | "hostname": "example.org", |
| 642 | "port": "", |
| 643 | "pathname": "/foo/:@c:29", |
| 644 | "search": "", |
| 645 | "hash": "" |
| 646 | }, |
| 647 | { |
| 648 | "input": "http://&a:foo(b]c@d:2/", |
| 649 | "base": "http://example.org/foo/bar", |
| 650 | "href": "http://&a:foo(b%5Dc@d:2/", |
| 651 | "origin": "http://d:2", |
| 652 | "protocol": "http:", |
| 653 | "username": "&a", |
| 654 | "password": "foo(b%5Dc", |
| 655 | "host": "d:2", |
| 656 | "hostname": "d", |
| 657 | "port": "2", |
| 658 | "pathname": "/", |
| 659 | "search": "", |
| 660 | "hash": "" |
| 661 | }, |
| 662 | { |
| 663 | "input": "http://::@c@d:2", |
| 664 | "base": "http://example.org/foo/bar", |
| 665 | "href": "http://:%3A%40c@d:2/", |
| 666 | "origin": "http://d:2", |
| 667 | "protocol": "http:", |
| 668 | "username": "", |
| 669 | "password": "%3A%40c", |
| 670 | "host": "d:2", |
| 671 | "hostname": "d", |
| 672 | "port": "2", |
| 673 | "pathname": "/", |
| 674 | "search": "", |
| 675 | "hash": "" |
| 676 | }, |
| 677 | { |
| 678 | "input": "http://foo.com:b@d/", |
| 679 | "base": "http://example.org/foo/bar", |
| 680 | "href": "http://foo.com:b@d/", |
| 681 | "origin": "http://d", |
| 682 | "protocol": "http:", |
| 683 | "username": "foo.com", |
| 684 | "password": "b", |
| 685 | "host": "d", |
| 686 | "hostname": "d", |
| 687 | "port": "", |
| 688 | "pathname": "/", |
| 689 | "search": "", |
| 690 | "hash": "" |
| 691 | }, |
| 692 | { |
| 693 | "input": "http://foo.com/\\@", |
| 694 | "base": "http://example.org/foo/bar", |
| 695 | "href": "http://foo.com//@", |
| 696 | "origin": "http://foo.com", |
| 697 | "protocol": "http:", |
| 698 | "username": "", |
| 699 | "password": "", |
| 700 | "host": "foo.com", |
| 701 | "hostname": "foo.com", |
| 702 | "port": "", |
| 703 | "pathname": "//@", |
| 704 | "search": "", |
| 705 | "hash": "" |
| 706 | }, |
| 707 | { |
| 708 | "input": "http:\\\\foo.com\\", |
| 709 | "base": "http://example.org/foo/bar", |
| 710 | "href": "http://foo.com/", |
| 711 | "origin": "http://foo.com", |
| 712 | "protocol": "http:", |
| 713 | "username": "", |
| 714 | "password": "", |
| 715 | "host": "foo.com", |
| 716 | "hostname": "foo.com", |
| 717 | "port": "", |
| 718 | "pathname": "/", |
| 719 | "search": "", |
| 720 | "hash": "" |
| 721 | }, |
| 722 | { |
| 723 | "input": "http:\\\\a\\b:c\\[email protected]\\", |
| 724 | "base": "http://example.org/foo/bar", |
| 725 | "href": "http://a/b:c/[email protected]/", |
| 726 | "origin": "http://a", |
| 727 | "protocol": "http:", |
| 728 | "username": "", |
| 729 | "password": "", |
| 730 | "host": "a", |
| 731 | "hostname": "a", |
| 732 | "port": "", |
| 733 | "pathname": "/b:c/[email protected]/", |
| 734 | "search": "", |
| 735 | "hash": "" |
| 736 | }, |
| 737 | { |
| 738 | "input": "foo:/", |
| 739 | "base": "http://example.org/foo/bar", |
| 740 | "href": "foo:/", |
| 741 | "origin": "null", |
| 742 | "protocol": "foo:", |
| 743 | "username": "", |
| 744 | "password": "", |
| 745 | "host": "", |
| 746 | "hostname": "", |
| 747 | "port": "", |
| 748 | "pathname": "/", |
| 749 | "search": "", |
| 750 | "hash": "" |
| 751 | }, |
| 752 | { |
| 753 | "input": "foo:/bar.com/", |
| 754 | "base": "http://example.org/foo/bar", |
| 755 | "href": "foo:/bar.com/", |
| 756 | "origin": "null", |
| 757 | "protocol": "foo:", |
| 758 | "username": "", |
| 759 | "password": "", |
| 760 | "host": "", |
| 761 | "hostname": "", |
| 762 | "port": "", |
| 763 | "pathname": "/bar.com/", |
| 764 | "search": "", |
| 765 | "hash": "" |
| 766 | }, |
| 767 | { |
| 768 | "input": "foo://///////", |
| 769 | "base": "http://example.org/foo/bar", |
| 770 | "href": "foo://///////", |
| 771 | "origin": "null", |
| 772 | "protocol": "foo:", |
| 773 | "username": "", |
| 774 | "password": "", |
| 775 | "host": "", |
| 776 | "hostname": "", |
| 777 | "port": "", |
| 778 | "pathname": "///////", |
| 779 | "search": "", |
| 780 | "hash": "" |
| 781 | }, |
| 782 | { |
| 783 | "input": "foo://///////bar.com/", |
| 784 | "base": "http://example.org/foo/bar", |
| 785 | "href": "foo://///////bar.com/", |
| 786 | "origin": "null", |
| 787 | "protocol": "foo:", |
| 788 | "username": "", |
| 789 | "password": "", |
| 790 | "host": "", |
| 791 | "hostname": "", |
| 792 | "port": "", |
| 793 | "pathname": "///////bar.com/", |
| 794 | "search": "", |
| 795 | "hash": "" |
| 796 | }, |
| 797 | { |
| 798 | "input": "foo:////://///", |
| 799 | "base": "http://example.org/foo/bar", |
| 800 | "href": "foo:////://///", |
| 801 | "origin": "null", |
| 802 | "protocol": "foo:", |
| 803 | "username": "", |
| 804 | "password": "", |
| 805 | "host": "", |
| 806 | "hostname": "", |
| 807 | "port": "", |
| 808 | "pathname": "//://///", |
| 809 | "search": "", |
| 810 | "hash": "" |
| 811 | }, |
| 812 | { |
| 813 | "input": "c:/foo", |
| 814 | "base": "http://example.org/foo/bar", |
| 815 | "href": "c:/foo", |
| 816 | "origin": "null", |
| 817 | "protocol": "c:", |
| 818 | "username": "", |
| 819 | "password": "", |
| 820 | "host": "", |
| 821 | "hostname": "", |
| 822 | "port": "", |
| 823 | "pathname": "/foo", |
| 824 | "search": "", |
| 825 | "hash": "" |
| 826 | }, |
| 827 | { |
| 828 | "input": "//foo/bar", |
| 829 | "base": "http://example.org/foo/bar", |
| 830 | "href": "http://foo/bar", |
| 831 | "origin": "http://foo", |
| 832 | "protocol": "http:", |
| 833 | "username": "", |
| 834 | "password": "", |
| 835 | "host": "foo", |
| 836 | "hostname": "foo", |
| 837 | "port": "", |
| 838 | "pathname": "/bar", |
| 839 | "search": "", |
| 840 | "hash": "" |
| 841 | }, |
| 842 | { |
| 843 | "input": "http://foo/path;a??e#f#g", |
| 844 | "base": "http://example.org/foo/bar", |
| 845 | "href": "http://foo/path;a??e#f#g", |
| 846 | "origin": "http://foo", |
| 847 | "protocol": "http:", |
| 848 | "username": "", |
| 849 | "password": "", |
| 850 | "host": "foo", |
| 851 | "hostname": "foo", |
| 852 | "port": "", |
| 853 | "pathname": "/path;a", |
| 854 | "search": "??e", |
| 855 | "hash": "#f#g" |
| 856 | }, |
| 857 | { |
| 858 | "input": "http://foo/abcd?efgh?ijkl", |
| 859 | "base": "http://example.org/foo/bar", |
| 860 | "href": "http://foo/abcd?efgh?ijkl", |
| 861 | "origin": "http://foo", |
| 862 | "protocol": "http:", |
| 863 | "username": "", |
| 864 | "password": "", |
| 865 | "host": "foo", |
| 866 | "hostname": "foo", |
| 867 | "port": "", |
| 868 | "pathname": "/abcd", |
| 869 | "search": "?efgh?ijkl", |
| 870 | "hash": "" |
| 871 | }, |
| 872 | { |
| 873 | "input": "http://foo/abcd#foo?bar", |
| 874 | "base": "http://example.org/foo/bar", |
| 875 | "href": "http://foo/abcd#foo?bar", |
| 876 | "origin": "http://foo", |
| 877 | "protocol": "http:", |
| 878 | "username": "", |
| 879 | "password": "", |
| 880 | "host": "foo", |
| 881 | "hostname": "foo", |
| 882 | "port": "", |
| 883 | "pathname": "/abcd", |
| 884 | "search": "", |
| 885 | "hash": "#foo?bar" |
| 886 | }, |
| 887 | { |
| 888 | "input": "[61:24:74]:98", |
| 889 | "base": "http://example.org/foo/bar", |
| 890 | "href": "http://example.org/foo/[61:24:74]:98", |
| 891 | "origin": "http://example.org", |
| 892 | "protocol": "http:", |
| 893 | "username": "", |
| 894 | "password": "", |
| 895 | "host": "example.org", |
| 896 | "hostname": "example.org", |
| 897 | "port": "", |
| 898 | "pathname": "/foo/[61:24:74]:98", |
| 899 | "search": "", |
| 900 | "hash": "" |
| 901 | }, |
| 902 | { |
| 903 | "input": "http:[61:27]/:foo", |
| 904 | "base": "http://example.org/foo/bar", |
| 905 | "href": "http://example.org/foo/[61:27]/:foo", |
| 906 | "origin": "http://example.org", |
| 907 | "protocol": "http:", |
| 908 | "username": "", |
| 909 | "password": "", |
| 910 | "host": "example.org", |
| 911 | "hostname": "example.org", |
| 912 | "port": "", |
| 913 | "pathname": "/foo/[61:27]/:foo", |
| 914 | "search": "", |
| 915 | "hash": "" |
| 916 | }, |
| 917 | { |
| 918 | "input": "http://[1::2]:3:4", |
| 919 | "base": "http://example.org/foo/bar", |
| 920 | "failure": true |
| 921 | }, |
| 922 | { |
| 923 | "input": "http://2001::1", |
| 924 | "base": "http://example.org/foo/bar", |
| 925 | "failure": true |
| 926 | }, |
| 927 | { |
| 928 | "input": "http://2001::1]", |
| 929 | "base": "http://example.org/foo/bar", |
| 930 | "failure": true |
| 931 | }, |
| 932 | { |
| 933 | "input": "http://2001::1]:80", |
| 934 | "base": "http://example.org/foo/bar", |
| 935 | "failure": true |
| 936 | }, |
| 937 | { |
| 938 | "input": "http://[2001::1]", |
| 939 | "base": "http://example.org/foo/bar", |
| 940 | "href": "http://[2001::1]/", |
| 941 | "origin": "http://[2001::1]", |
| 942 | "protocol": "http:", |
| 943 | "username": "", |
| 944 | "password": "", |
| 945 | "host": "[2001::1]", |
| 946 | "hostname": "[2001::1]", |
| 947 | "port": "", |
| 948 | "pathname": "/", |
| 949 | "search": "", |
| 950 | "hash": "" |
| 951 | }, |
| 952 | { |
| 953 | "input": "http://[::127.0.0.1]", |
| 954 | "base": "http://example.org/foo/bar", |
| 955 | "href": "http://[::7f00:1]/", |
| 956 | "origin": "http://[::7f00:1]", |
| 957 | "protocol": "http:", |
| 958 | "username": "", |
| 959 | "password": "", |
| 960 | "host": "[::7f00:1]", |
| 961 | "hostname": "[::7f00:1]", |
| 962 | "port": "", |
| 963 | "pathname": "/", |
| 964 | "search": "", |
| 965 | "hash": "" |
| 966 | }, |
| 967 | { |
| 968 | "input": "http://[::127.0.0.1.]", |
| 969 | "base": "http://example.org/foo/bar", |
| 970 | "failure": true |
| 971 | }, |
| 972 | { |
| 973 | "input": "http://[0:0:0:0:0:0:13.1.68.3]", |
| 974 | "base": "http://example.org/foo/bar", |
| 975 | "href": "http://[::d01:4403]/", |
| 976 | "origin": "http://[::d01:4403]", |
| 977 | "protocol": "http:", |
| 978 | "username": "", |
| 979 | "password": "", |
| 980 | "host": "[::d01:4403]", |
| 981 | "hostname": "[::d01:4403]", |
| 982 | "port": "", |
| 983 | "pathname": "/", |
| 984 | "search": "", |
| 985 | "hash": "" |
| 986 | }, |
| 987 | { |
| 988 | "input": "http://[2001::1]:80", |
| 989 | "base": "http://example.org/foo/bar", |
| 990 | "href": "http://[2001::1]/", |
| 991 | "origin": "http://[2001::1]", |
| 992 | "protocol": "http:", |
| 993 | "username": "", |
| 994 | "password": "", |
| 995 | "host": "[2001::1]", |
| 996 | "hostname": "[2001::1]", |
| 997 | "port": "", |
| 998 | "pathname": "/", |
| 999 | "search": "", |
| 1000 | "hash": "" |
| 1001 | }, |
| 1002 | { |
| 1003 | "input": "http:/example.com/", |
| 1004 | "base": "http://example.org/foo/bar", |
| 1005 | "href": "http://example.org/example.com/", |
| 1006 | "origin": "http://example.org", |
| 1007 | "protocol": "http:", |
| 1008 | "username": "", |
| 1009 | "password": "", |
| 1010 | "host": "example.org", |
| 1011 | "hostname": "example.org", |
| 1012 | "port": "", |
| 1013 | "pathname": "/example.com/", |
| 1014 | "search": "", |
| 1015 | "hash": "" |
| 1016 | }, |
| 1017 | { |
| 1018 | "input": "ftp:/example.com/", |
| 1019 | "base": "http://example.org/foo/bar", |
| 1020 | "href": "ftp://example.com/", |
| 1021 | "origin": "ftp://example.com", |
| 1022 | "protocol": "ftp:", |
| 1023 | "username": "", |
| 1024 | "password": "", |
| 1025 | "host": "example.com", |
| 1026 | "hostname": "example.com", |
| 1027 | "port": "", |
| 1028 | "pathname": "/", |
| 1029 | "search": "", |
| 1030 | "hash": "" |
| 1031 | }, |
| 1032 | { |
| 1033 | "input": "https:/example.com/", |
| 1034 | "base": "http://example.org/foo/bar", |
| 1035 | "href": "https://example.com/", |
| 1036 | "origin": "https://example.com", |
| 1037 | "protocol": "https:", |
| 1038 | "username": "", |
| 1039 | "password": "", |
| 1040 | "host": "example.com", |
| 1041 | "hostname": "example.com", |
| 1042 | "port": "", |
| 1043 | "pathname": "/", |
| 1044 | "search": "", |
| 1045 | "hash": "" |
| 1046 | }, |
| 1047 | { |
| 1048 | "input": "madeupscheme:/example.com/", |
| 1049 | "base": "http://example.org/foo/bar", |
| 1050 | "href": "madeupscheme:/example.com/", |
| 1051 | "origin": "null", |
| 1052 | "protocol": "madeupscheme:", |
| 1053 | "username": "", |
| 1054 | "password": "", |
| 1055 | "host": "", |
| 1056 | "hostname": "", |
| 1057 | "port": "", |
| 1058 | "pathname": "/example.com/", |
| 1059 | "search": "", |
| 1060 | "hash": "" |
| 1061 | }, |
| 1062 | { |
| 1063 | "input": "file:/example.com/", |
| 1064 | "base": "http://example.org/foo/bar", |
| 1065 | "href": "file:///example.com/", |
| 1066 | "protocol": "file:", |
| 1067 | "username": "", |
| 1068 | "password": "", |
| 1069 | "host": "", |
| 1070 | "hostname": "", |
| 1071 | "port": "", |
| 1072 | "pathname": "/example.com/", |
| 1073 | "search": "", |
| 1074 | "hash": "" |
| 1075 | }, |
| 1076 | { |
| 1077 | "input": "file://example:1/", |
| 1078 | "base": null, |
| 1079 | "failure": true |
| 1080 | }, |
| 1081 | { |
| 1082 | "input": "file://example:test/", |
| 1083 | "base": null, |
| 1084 | "failure": true |
| 1085 | }, |
| 1086 | { |
| 1087 | "input": "file://example%/", |
| 1088 | "base": null, |
| 1089 | "failure": true |
| 1090 | }, |
| 1091 | { |
| 1092 | "input": "file://[example]/", |
| 1093 | "base": null, |
| 1094 | "failure": true |
| 1095 | }, |
| 1096 | { |
| 1097 | "input": "ftps:/example.com/", |
| 1098 | "base": "http://example.org/foo/bar", |
| 1099 | "href": "ftps:/example.com/", |
| 1100 | "origin": "null", |
| 1101 | "protocol": "ftps:", |
| 1102 | "username": "", |
| 1103 | "password": "", |
| 1104 | "host": "", |
| 1105 | "hostname": "", |
| 1106 | "port": "", |
| 1107 | "pathname": "/example.com/", |
| 1108 | "search": "", |
| 1109 | "hash": "" |
| 1110 | }, |
| 1111 | { |
| 1112 | "input": "gopher:/example.com/", |
| 1113 | "base": "http://example.org/foo/bar", |
| 1114 | "href": "gopher:/example.com/", |
| 1115 | "origin": "null", |
| 1116 | "protocol": "gopher:", |
| 1117 | "username": "", |
| 1118 | "password": "", |
| 1119 | "host": "", |
| 1120 | "hostname": "", |
| 1121 | "port": "", |
| 1122 | "pathname": "/example.com/", |
| 1123 | "search": "", |
| 1124 | "hash": "" |
| 1125 | }, |
| 1126 | { |
| 1127 | "input": "ws:/example.com/", |
| 1128 | "base": "http://example.org/foo/bar", |
| 1129 | "href": "ws://example.com/", |
| 1130 | "origin": "ws://example.com", |
| 1131 | "protocol": "ws:", |
| 1132 | "username": "", |
| 1133 | "password": "", |
| 1134 | "host": "example.com", |
| 1135 | "hostname": "example.com", |
| 1136 | "port": "", |
| 1137 | "pathname": "/", |
| 1138 | "search": "", |
| 1139 | "hash": "" |
| 1140 | }, |
| 1141 | { |
| 1142 | "input": "wss:/example.com/", |
| 1143 | "base": "http://example.org/foo/bar", |
| 1144 | "href": "wss://example.com/", |
| 1145 | "origin": "wss://example.com", |
| 1146 | "protocol": "wss:", |
| 1147 | "username": "", |
| 1148 | "password": "", |
| 1149 | "host": "example.com", |
| 1150 | "hostname": "example.com", |
| 1151 | "port": "", |
| 1152 | "pathname": "/", |
| 1153 | "search": "", |
| 1154 | "hash": "" |
| 1155 | }, |
| 1156 | { |
| 1157 | "input": "data:/example.com/", |
| 1158 | "base": "http://example.org/foo/bar", |
| 1159 | "href": "data:/example.com/", |
| 1160 | "origin": "null", |
| 1161 | "protocol": "data:", |
| 1162 | "username": "", |
| 1163 | "password": "", |
| 1164 | "host": "", |
| 1165 | "hostname": "", |
| 1166 | "port": "", |
| 1167 | "pathname": "/example.com/", |
| 1168 | "search": "", |
| 1169 | "hash": "" |
| 1170 | }, |
| 1171 | { |
| 1172 | "input": "javascript:/example.com/", |
| 1173 | "base": "http://example.org/foo/bar", |
| 1174 | "href": "javascript:/example.com/", |
| 1175 | "origin": "null", |
| 1176 | "protocol": "javascript:", |
| 1177 | "username": "", |
| 1178 | "password": "", |
| 1179 | "host": "", |
| 1180 | "hostname": "", |
| 1181 | "port": "", |
| 1182 | "pathname": "/example.com/", |
| 1183 | "search": "", |
| 1184 | "hash": "" |
| 1185 | }, |
| 1186 | { |
| 1187 | "input": "mailto:/example.com/", |
| 1188 | "base": "http://example.org/foo/bar", |
| 1189 | "href": "mailto:/example.com/", |
| 1190 | "origin": "null", |
| 1191 | "protocol": "mailto:", |
| 1192 | "username": "", |
| 1193 | "password": "", |
| 1194 | "host": "", |
| 1195 | "hostname": "", |
| 1196 | "port": "", |
| 1197 | "pathname": "/example.com/", |
| 1198 | "search": "", |
| 1199 | "hash": "" |
| 1200 | }, |
| 1201 | { |
| 1202 | "input": "http:example.com/", |
| 1203 | "base": "http://example.org/foo/bar", |
| 1204 | "href": "http://example.org/foo/example.com/", |
| 1205 | "origin": "http://example.org", |
| 1206 | "protocol": "http:", |
| 1207 | "username": "", |
| 1208 | "password": "", |
| 1209 | "host": "example.org", |
| 1210 | "hostname": "example.org", |
| 1211 | "port": "", |
| 1212 | "pathname": "/foo/example.com/", |
| 1213 | "search": "", |
| 1214 | "hash": "" |
| 1215 | }, |
| 1216 | { |
| 1217 | "input": "ftp:example.com/", |
| 1218 | "base": "http://example.org/foo/bar", |
| 1219 | "href": "ftp://example.com/", |
| 1220 | "origin": "ftp://example.com", |
| 1221 | "protocol": "ftp:", |
| 1222 | "username": "", |
| 1223 | "password": "", |
| 1224 | "host": "example.com", |
| 1225 | "hostname": "example.com", |
| 1226 | "port": "", |
| 1227 | "pathname": "/", |
| 1228 | "search": "", |
| 1229 | "hash": "" |
| 1230 | }, |
| 1231 | { |
| 1232 | "input": "https:example.com/", |
| 1233 | "base": "http://example.org/foo/bar", |
| 1234 | "href": "https://example.com/", |
| 1235 | "origin": "https://example.com", |
| 1236 | "protocol": "https:", |
| 1237 | "username": "", |
| 1238 | "password": "", |
| 1239 | "host": "example.com", |
| 1240 | "hostname": "example.com", |
| 1241 | "port": "", |
| 1242 | "pathname": "/", |
| 1243 | "search": "", |
| 1244 | "hash": "" |
| 1245 | }, |
| 1246 | { |
| 1247 | "input": "madeupscheme:example.com/", |
| 1248 | "base": "http://example.org/foo/bar", |
| 1249 | "href": "madeupscheme:example.com/", |
| 1250 | "origin": "null", |
| 1251 | "protocol": "madeupscheme:", |
| 1252 | "username": "", |
| 1253 | "password": "", |
| 1254 | "host": "", |
| 1255 | "hostname": "", |
| 1256 | "port": "", |
| 1257 | "pathname": "example.com/", |
| 1258 | "search": "", |
| 1259 | "hash": "" |
| 1260 | }, |
| 1261 | { |
| 1262 | "input": "ftps:example.com/", |
| 1263 | "base": "http://example.org/foo/bar", |
| 1264 | "href": "ftps:example.com/", |
| 1265 | "origin": "null", |
| 1266 | "protocol": "ftps:", |
| 1267 | "username": "", |
| 1268 | "password": "", |
| 1269 | "host": "", |
| 1270 | "hostname": "", |
| 1271 | "port": "", |
| 1272 | "pathname": "example.com/", |
| 1273 | "search": "", |
| 1274 | "hash": "" |
| 1275 | }, |
| 1276 | { |
| 1277 | "input": "gopher:example.com/", |
| 1278 | "base": "http://example.org/foo/bar", |
| 1279 | "href": "gopher:example.com/", |
| 1280 | "origin": "null", |
| 1281 | "protocol": "gopher:", |
| 1282 | "username": "", |
| 1283 | "password": "", |
| 1284 | "host": "", |
| 1285 | "hostname": "", |
| 1286 | "port": "", |
| 1287 | "pathname": "example.com/", |
| 1288 | "search": "", |
| 1289 | "hash": "" |
| 1290 | }, |
| 1291 | { |
| 1292 | "input": "ws:example.com/", |
| 1293 | "base": "http://example.org/foo/bar", |
| 1294 | "href": "ws://example.com/", |
| 1295 | "origin": "ws://example.com", |
| 1296 | "protocol": "ws:", |
| 1297 | "username": "", |
| 1298 | "password": "", |
| 1299 | "host": "example.com", |
| 1300 | "hostname": "example.com", |
| 1301 | "port": "", |
| 1302 | "pathname": "/", |
| 1303 | "search": "", |
| 1304 | "hash": "" |
| 1305 | }, |
| 1306 | { |
| 1307 | "input": "wss:example.com/", |
| 1308 | "base": "http://example.org/foo/bar", |
| 1309 | "href": "wss://example.com/", |
| 1310 | "origin": "wss://example.com", |
| 1311 | "protocol": "wss:", |
| 1312 | "username": "", |
| 1313 | "password": "", |
| 1314 | "host": "example.com", |
| 1315 | "hostname": "example.com", |
| 1316 | "port": "", |
| 1317 | "pathname": "/", |
| 1318 | "search": "", |
| 1319 | "hash": "" |
| 1320 | }, |
| 1321 | { |
| 1322 | "input": "data:example.com/", |
| 1323 | "base": "http://example.org/foo/bar", |
| 1324 | "href": "data:example.com/", |
| 1325 | "origin": "null", |
| 1326 | "protocol": "data:", |
| 1327 | "username": "", |
| 1328 | "password": "", |
| 1329 | "host": "", |
| 1330 | "hostname": "", |
| 1331 | "port": "", |
| 1332 | "pathname": "example.com/", |
| 1333 | "search": "", |
| 1334 | "hash": "" |
| 1335 | }, |
| 1336 | { |
| 1337 | "input": "javascript:example.com/", |
| 1338 | "base": "http://example.org/foo/bar", |
| 1339 | "href": "javascript:example.com/", |
| 1340 | "origin": "null", |
| 1341 | "protocol": "javascript:", |
| 1342 | "username": "", |
| 1343 | "password": "", |
| 1344 | "host": "", |
| 1345 | "hostname": "", |
| 1346 | "port": "", |
| 1347 | "pathname": "example.com/", |
| 1348 | "search": "", |
| 1349 | "hash": "" |
| 1350 | }, |
| 1351 | { |
| 1352 | "input": "mailto:example.com/", |
| 1353 | "base": "http://example.org/foo/bar", |
| 1354 | "href": "mailto:example.com/", |
| 1355 | "origin": "null", |
| 1356 | "protocol": "mailto:", |
| 1357 | "username": "", |
| 1358 | "password": "", |
| 1359 | "host": "", |
| 1360 | "hostname": "", |
| 1361 | "port": "", |
| 1362 | "pathname": "example.com/", |
| 1363 | "search": "", |
| 1364 | "hash": "" |
| 1365 | }, |
| 1366 | { |
| 1367 | "input": "/a/b/c", |
| 1368 | "base": "http://example.org/foo/bar", |
| 1369 | "href": "http://example.org/a/b/c", |
| 1370 | "origin": "http://example.org", |
| 1371 | "protocol": "http:", |
| 1372 | "username": "", |
| 1373 | "password": "", |
| 1374 | "host": "example.org", |
| 1375 | "hostname": "example.org", |
| 1376 | "port": "", |
| 1377 | "pathname": "/a/b/c", |
| 1378 | "search": "", |
| 1379 | "hash": "" |
| 1380 | }, |
| 1381 | { |
| 1382 | "input": "/a/ /c", |
| 1383 | "base": "http://example.org/foo/bar", |
| 1384 | "href": "http://example.org/a/%20/c", |
| 1385 | "origin": "http://example.org", |
| 1386 | "protocol": "http:", |
| 1387 | "username": "", |
| 1388 | "password": "", |
| 1389 | "host": "example.org", |
| 1390 | "hostname": "example.org", |
| 1391 | "port": "", |
| 1392 | "pathname": "/a/%20/c", |
| 1393 | "search": "", |
| 1394 | "hash": "" |
| 1395 | }, |
| 1396 | { |
| 1397 | "input": "/a%2fc", |
| 1398 | "base": "http://example.org/foo/bar", |
| 1399 | "href": "http://example.org/a%2fc", |
| 1400 | "origin": "http://example.org", |
| 1401 | "protocol": "http:", |
| 1402 | "username": "", |
| 1403 | "password": "", |
| 1404 | "host": "example.org", |
| 1405 | "hostname": "example.org", |
| 1406 | "port": "", |
| 1407 | "pathname": "/a%2fc", |
| 1408 | "search": "", |
| 1409 | "hash": "" |
| 1410 | }, |
| 1411 | { |
| 1412 | "input": "/a/%2f/c", |
| 1413 | "base": "http://example.org/foo/bar", |
| 1414 | "href": "http://example.org/a/%2f/c", |
| 1415 | "origin": "http://example.org", |
| 1416 | "protocol": "http:", |
| 1417 | "username": "", |
| 1418 | "password": "", |
| 1419 | "host": "example.org", |
| 1420 | "hostname": "example.org", |
| 1421 | "port": "", |
| 1422 | "pathname": "/a/%2f/c", |
| 1423 | "search": "", |
| 1424 | "hash": "" |
| 1425 | }, |
| 1426 | { |
| 1427 | "input": "#β", |
| 1428 | "base": "http://example.org/foo/bar", |
| 1429 | "href": "http://example.org/foo/bar#%CE%B2", |
| 1430 | "origin": "http://example.org", |
| 1431 | "protocol": "http:", |
| 1432 | "username": "", |
| 1433 | "password": "", |
| 1434 | "host": "example.org", |
| 1435 | "hostname": "example.org", |
| 1436 | "port": "", |
| 1437 | "pathname": "/foo/bar", |
| 1438 | "search": "", |
| 1439 | "hash": "#%CE%B2" |
| 1440 | }, |
| 1441 | { |
| 1442 | "input": "data:text/html,test#test", |
| 1443 | "base": "http://example.org/foo/bar", |
| 1444 | "href": "data:text/html,test#test", |
| 1445 | "origin": "null", |
| 1446 | "protocol": "data:", |
| 1447 | "username": "", |
| 1448 | "password": "", |
| 1449 | "host": "", |
| 1450 | "hostname": "", |
| 1451 | "port": "", |
| 1452 | "pathname": "text/html,test", |
| 1453 | "search": "", |
| 1454 | "hash": "#test" |
| 1455 | }, |
| 1456 | { |
| 1457 | "input": "tel:1234567890", |
| 1458 | "base": "http://example.org/foo/bar", |
| 1459 | "href": "tel:1234567890", |
| 1460 | "origin": "null", |
| 1461 | "protocol": "tel:", |
| 1462 | "username": "", |
| 1463 | "password": "", |
| 1464 | "host": "", |
| 1465 | "hostname": "", |
| 1466 | "port": "", |
| 1467 | "pathname": "1234567890", |
| 1468 | "search": "", |
| 1469 | "hash": "" |
| 1470 | }, |
| 1471 | "# Based on https://felixfbecker.github.io/whatwg-url-custom-host-repro/", |
| 1472 | { |
| 1473 | "input": "ssh://example.com/foo/bar.git", |
| 1474 | "base": "http://example.org/", |
| 1475 | "href": "ssh://example.com/foo/bar.git", |
| 1476 | "origin": "null", |
| 1477 | "protocol": "ssh:", |
| 1478 | "username": "", |
| 1479 | "password": "", |
| 1480 | "host": "example.com", |
| 1481 | "hostname": "example.com", |
| 1482 | "port": "", |
| 1483 | "pathname": "/foo/bar.git", |
| 1484 | "search": "", |
| 1485 | "hash": "" |
| 1486 | }, |
| 1487 | "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html", |
| 1488 | { |
| 1489 | "input": "file:c:\\foo\\bar.html", |
| 1490 | "base": "file:///tmp/mock/path", |
| 1491 | "href": "file:///c:/foo/bar.html", |
| 1492 | "protocol": "file:", |
| 1493 | "username": "", |
| 1494 | "password": "", |
| 1495 | "host": "", |
| 1496 | "hostname": "", |
| 1497 | "port": "", |
| 1498 | "pathname": "/c:/foo/bar.html", |
| 1499 | "search": "", |
| 1500 | "hash": "" |
| 1501 | }, |
| 1502 | { |
| 1503 | "input": " File:c|////foo\\bar.html", |
| 1504 | "base": "file:///tmp/mock/path", |
| 1505 | "href": "file:///c:////foo/bar.html", |
| 1506 | "protocol": "file:", |
| 1507 | "username": "", |
| 1508 | "password": "", |
| 1509 | "host": "", |
| 1510 | "hostname": "", |
| 1511 | "port": "", |
| 1512 | "pathname": "/c:////foo/bar.html", |
| 1513 | "search": "", |
| 1514 | "hash": "" |
| 1515 | }, |
| 1516 | { |
| 1517 | "input": "C|/foo/bar", |
| 1518 | "base": "file:///tmp/mock/path", |
| 1519 | "href": "file:///C:/foo/bar", |
| 1520 | "protocol": "file:", |
| 1521 | "username": "", |
| 1522 | "password": "", |
| 1523 | "host": "", |
| 1524 | "hostname": "", |
| 1525 | "port": "", |
| 1526 | "pathname": "/C:/foo/bar", |
| 1527 | "search": "", |
| 1528 | "hash": "" |
| 1529 | }, |
| 1530 | { |
| 1531 | "input": "/C|\\foo\\bar", |
| 1532 | "base": "file:///tmp/mock/path", |
| 1533 | "href": "file:///C:/foo/bar", |
| 1534 | "protocol": "file:", |
| 1535 | "username": "", |
| 1536 | "password": "", |
| 1537 | "host": "", |
| 1538 | "hostname": "", |
| 1539 | "port": "", |
| 1540 | "pathname": "/C:/foo/bar", |
| 1541 | "search": "", |
| 1542 | "hash": "" |
| 1543 | }, |
| 1544 | { |
| 1545 | "input": "//C|/foo/bar", |
| 1546 | "base": "file:///tmp/mock/path", |
| 1547 | "href": "file:///C:/foo/bar", |
| 1548 | "protocol": "file:", |
| 1549 | "username": "", |
| 1550 | "password": "", |
| 1551 | "host": "", |
| 1552 | "hostname": "", |
| 1553 | "port": "", |
| 1554 | "pathname": "/C:/foo/bar", |
| 1555 | "search": "", |
| 1556 | "hash": "" |
| 1557 | }, |
| 1558 | { |
| 1559 | "input": "//server/file", |
| 1560 | "base": "file:///tmp/mock/path", |
| 1561 | "href": "file://server/file", |
| 1562 | "protocol": "file:", |
| 1563 | "username": "", |
| 1564 | "password": "", |
| 1565 | "host": "server", |
| 1566 | "hostname": "server", |
| 1567 | "port": "", |
| 1568 | "pathname": "/file", |
| 1569 | "search": "", |
| 1570 | "hash": "" |
| 1571 | }, |
| 1572 | { |
| 1573 | "input": "\\\\server\\file", |
| 1574 | "base": "file:///tmp/mock/path", |
| 1575 | "href": "file://server/file", |
| 1576 | "protocol": "file:", |
| 1577 | "username": "", |
| 1578 | "password": "", |
| 1579 | "host": "server", |
| 1580 | "hostname": "server", |
| 1581 | "port": "", |
| 1582 | "pathname": "/file", |
| 1583 | "search": "", |
| 1584 | "hash": "" |
| 1585 | }, |
| 1586 | { |
| 1587 | "input": "/\\server/file", |
| 1588 | "base": "file:///tmp/mock/path", |
| 1589 | "href": "file://server/file", |
| 1590 | "protocol": "file:", |
| 1591 | "username": "", |
| 1592 | "password": "", |
| 1593 | "host": "server", |
| 1594 | "hostname": "server", |
| 1595 | "port": "", |
| 1596 | "pathname": "/file", |
| 1597 | "search": "", |
| 1598 | "hash": "" |
| 1599 | }, |
| 1600 | { |
| 1601 | "input": "file:///foo/bar.txt", |
| 1602 | "base": "file:///tmp/mock/path", |
| 1603 | "href": "file:///foo/bar.txt", |
| 1604 | "protocol": "file:", |
| 1605 | "username": "", |
| 1606 | "password": "", |
| 1607 | "host": "", |
| 1608 | "hostname": "", |
| 1609 | "port": "", |
| 1610 | "pathname": "/foo/bar.txt", |
| 1611 | "search": "", |
| 1612 | "hash": "" |
| 1613 | }, |
| 1614 | { |
| 1615 | "input": "file:///home/me", |
| 1616 | "base": "file:///tmp/mock/path", |
| 1617 | "href": "file:///home/me", |
| 1618 | "protocol": "file:", |
| 1619 | "username": "", |
| 1620 | "password": "", |
| 1621 | "host": "", |
| 1622 | "hostname": "", |
| 1623 | "port": "", |
| 1624 | "pathname": "/home/me", |
| 1625 | "search": "", |
| 1626 | "hash": "" |
| 1627 | }, |
| 1628 | { |
| 1629 | "input": "//", |
| 1630 | "base": "file:///tmp/mock/path", |
| 1631 | "href": "file:///", |
| 1632 | "protocol": "file:", |
| 1633 | "username": "", |
| 1634 | "password": "", |
| 1635 | "host": "", |
| 1636 | "hostname": "", |
| 1637 | "port": "", |
| 1638 | "pathname": "/", |
| 1639 | "search": "", |
| 1640 | "hash": "" |
| 1641 | }, |
| 1642 | { |
| 1643 | "input": "///", |
| 1644 | "base": "file:///tmp/mock/path", |
| 1645 | "href": "file:///", |
| 1646 | "protocol": "file:", |
| 1647 | "username": "", |
| 1648 | "password": "", |
| 1649 | "host": "", |
| 1650 | "hostname": "", |
| 1651 | "port": "", |
| 1652 | "pathname": "/", |
| 1653 | "search": "", |
| 1654 | "hash": "" |
| 1655 | }, |
| 1656 | { |
| 1657 | "input": "///test", |
| 1658 | "base": "file:///tmp/mock/path", |
| 1659 | "href": "file:///test", |
| 1660 | "protocol": "file:", |
| 1661 | "username": "", |
| 1662 | "password": "", |
| 1663 | "host": "", |
| 1664 | "hostname": "", |
| 1665 | "port": "", |
| 1666 | "pathname": "/test", |
| 1667 | "search": "", |
| 1668 | "hash": "" |
| 1669 | }, |
| 1670 | { |
| 1671 | "input": "file://test", |
| 1672 | "base": "file:///tmp/mock/path", |
| 1673 | "href": "file://test/", |
| 1674 | "protocol": "file:", |
| 1675 | "username": "", |
| 1676 | "password": "", |
| 1677 | "host": "test", |
| 1678 | "hostname": "test", |
| 1679 | "port": "", |
| 1680 | "pathname": "/", |
| 1681 | "search": "", |
| 1682 | "hash": "" |
| 1683 | }, |
| 1684 | { |
| 1685 | "input": "file://localhost", |
| 1686 | "base": "file:///tmp/mock/path", |
| 1687 | "href": "file:///", |
| 1688 | "protocol": "file:", |
| 1689 | "username": "", |
| 1690 | "password": "", |
| 1691 | "host": "", |
| 1692 | "hostname": "", |
| 1693 | "port": "", |
| 1694 | "pathname": "/", |
| 1695 | "search": "", |
| 1696 | "hash": "" |
| 1697 | }, |
| 1698 | { |
| 1699 | "input": "file://localhost/", |
| 1700 | "base": "file:///tmp/mock/path", |
| 1701 | "href": "file:///", |
| 1702 | "protocol": "file:", |
| 1703 | "username": "", |
| 1704 | "password": "", |
| 1705 | "host": "", |
| 1706 | "hostname": "", |
| 1707 | "port": "", |
| 1708 | "pathname": "/", |
| 1709 | "search": "", |
| 1710 | "hash": "" |
| 1711 | }, |
| 1712 | { |
| 1713 | "input": "file://localhost/test", |
| 1714 | "base": "file:///tmp/mock/path", |
| 1715 | "href": "file:///test", |
| 1716 | "protocol": "file:", |
| 1717 | "username": "", |
| 1718 | "password": "", |
| 1719 | "host": "", |
| 1720 | "hostname": "", |
| 1721 | "port": "", |
| 1722 | "pathname": "/test", |
| 1723 | "search": "", |
| 1724 | "hash": "" |
| 1725 | }, |
| 1726 | { |
| 1727 | "input": "test", |
| 1728 | "base": "file:///tmp/mock/path", |
| 1729 | "href": "file:///tmp/mock/test", |
| 1730 | "protocol": "file:", |
| 1731 | "username": "", |
| 1732 | "password": "", |
| 1733 | "host": "", |
| 1734 | "hostname": "", |
| 1735 | "port": "", |
| 1736 | "pathname": "/tmp/mock/test", |
| 1737 | "search": "", |
| 1738 | "hash": "" |
| 1739 | }, |
| 1740 | { |
| 1741 | "input": "file:test", |
| 1742 | "base": "file:///tmp/mock/path", |
| 1743 | "href": "file:///tmp/mock/test", |
| 1744 | "protocol": "file:", |
| 1745 | "username": "", |
| 1746 | "password": "", |
| 1747 | "host": "", |
| 1748 | "hostname": "", |
| 1749 | "port": "", |
| 1750 | "pathname": "/tmp/mock/test", |
| 1751 | "search": "", |
| 1752 | "hash": "" |
| 1753 | }, |
| 1754 | "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js", |
| 1755 | { |
| 1756 | "input": "http://example.com/././foo", |
| 1757 | "base": null, |
| 1758 | "href": "http://example.com/foo", |
| 1759 | "origin": "http://example.com", |
| 1760 | "protocol": "http:", |
| 1761 | "username": "", |
| 1762 | "password": "", |
| 1763 | "host": "example.com", |
| 1764 | "hostname": "example.com", |
| 1765 | "port": "", |
| 1766 | "pathname": "/foo", |
| 1767 | "search": "", |
| 1768 | "hash": "" |
| 1769 | }, |
| 1770 | { |
| 1771 | "input": "http://example.com/./.foo", |
| 1772 | "base": null, |
| 1773 | "href": "http://example.com/.foo", |
| 1774 | "origin": "http://example.com", |
| 1775 | "protocol": "http:", |
| 1776 | "username": "", |
| 1777 | "password": "", |
| 1778 | "host": "example.com", |
| 1779 | "hostname": "example.com", |
| 1780 | "port": "", |
| 1781 | "pathname": "/.foo", |
| 1782 | "search": "", |
| 1783 | "hash": "" |
| 1784 | }, |
| 1785 | { |
| 1786 | "input": "http://example.com/foo/.", |
| 1787 | "base": null, |
| 1788 | "href": "http://example.com/foo/", |
| 1789 | "origin": "http://example.com", |
| 1790 | "protocol": "http:", |
| 1791 | "username": "", |
| 1792 | "password": "", |
| 1793 | "host": "example.com", |
| 1794 | "hostname": "example.com", |
| 1795 | "port": "", |
| 1796 | "pathname": "/foo/", |
| 1797 | "search": "", |
| 1798 | "hash": "" |
| 1799 | }, |
| 1800 | { |
| 1801 | "input": "http://example.com/foo/./", |
| 1802 | "base": null, |
| 1803 | "href": "http://example.com/foo/", |
| 1804 | "origin": "http://example.com", |
| 1805 | "protocol": "http:", |
| 1806 | "username": "", |
| 1807 | "password": "", |
| 1808 | "host": "example.com", |
| 1809 | "hostname": "example.com", |
| 1810 | "port": "", |
| 1811 | "pathname": "/foo/", |
| 1812 | "search": "", |
| 1813 | "hash": "" |
| 1814 | }, |
| 1815 | { |
| 1816 | "input": "http://example.com/foo/bar/..", |
| 1817 | "base": null, |
| 1818 | "href": "http://example.com/foo/", |
| 1819 | "origin": "http://example.com", |
| 1820 | "protocol": "http:", |
| 1821 | "username": "", |
| 1822 | "password": "", |
| 1823 | "host": "example.com", |
| 1824 | "hostname": "example.com", |
| 1825 | "port": "", |
| 1826 | "pathname": "/foo/", |
| 1827 | "search": "", |
| 1828 | "hash": "" |
| 1829 | }, |
| 1830 | { |
| 1831 | "input": "http://example.com/foo/bar/../", |
| 1832 | "base": null, |
| 1833 | "href": "http://example.com/foo/", |
| 1834 | "origin": "http://example.com", |
| 1835 | "protocol": "http:", |
| 1836 | "username": "", |
| 1837 | "password": "", |
| 1838 | "host": "example.com", |
| 1839 | "hostname": "example.com", |
| 1840 | "port": "", |
| 1841 | "pathname": "/foo/", |
| 1842 | "search": "", |
| 1843 | "hash": "" |
| 1844 | }, |
| 1845 | { |
| 1846 | "input": "http://example.com/foo/..bar", |
| 1847 | "base": null, |
| 1848 | "href": "http://example.com/foo/..bar", |
| 1849 | "origin": "http://example.com", |
| 1850 | "protocol": "http:", |
| 1851 | "username": "", |
| 1852 | "password": "", |
| 1853 | "host": "example.com", |
| 1854 | "hostname": "example.com", |
| 1855 | "port": "", |
| 1856 | "pathname": "/foo/..bar", |
| 1857 | "search": "", |
| 1858 | "hash": "" |
| 1859 | }, |
| 1860 | { |
| 1861 | "input": "http://example.com/foo/bar/../ton", |
| 1862 | "base": null, |
| 1863 | "href": "http://example.com/foo/ton", |
| 1864 | "origin": "http://example.com", |
| 1865 | "protocol": "http:", |
| 1866 | "username": "", |
| 1867 | "password": "", |
| 1868 | "host": "example.com", |
| 1869 | "hostname": "example.com", |
| 1870 | "port": "", |
| 1871 | "pathname": "/foo/ton", |
| 1872 | "search": "", |
| 1873 | "hash": "" |
| 1874 | }, |
| 1875 | { |
| 1876 | "input": "http://example.com/foo/bar/../ton/../../a", |
| 1877 | "base": null, |
| 1878 | "href": "http://example.com/a", |
| 1879 | "origin": "http://example.com", |
| 1880 | "protocol": "http:", |
| 1881 | "username": "", |
| 1882 | "password": "", |
| 1883 | "host": "example.com", |
| 1884 | "hostname": "example.com", |
| 1885 | "port": "", |
| 1886 | "pathname": "/a", |
| 1887 | "search": "", |
| 1888 | "hash": "" |
| 1889 | }, |
| 1890 | { |
| 1891 | "input": "http://example.com/foo/../../..", |
| 1892 | "base": null, |
| 1893 | "href": "http://example.com/", |
| 1894 | "origin": "http://example.com", |
| 1895 | "protocol": "http:", |
| 1896 | "username": "", |
| 1897 | "password": "", |
| 1898 | "host": "example.com", |
| 1899 | "hostname": "example.com", |
| 1900 | "port": "", |
| 1901 | "pathname": "/", |
| 1902 | "search": "", |
| 1903 | "hash": "" |
| 1904 | }, |
| 1905 | { |
| 1906 | "input": "http://example.com/foo/../../../ton", |
| 1907 | "base": null, |
| 1908 | "href": "http://example.com/ton", |
| 1909 | "origin": "http://example.com", |
| 1910 | "protocol": "http:", |
| 1911 | "username": "", |
| 1912 | "password": "", |
| 1913 | "host": "example.com", |
| 1914 | "hostname": "example.com", |
| 1915 | "port": "", |
| 1916 | "pathname": "/ton", |
| 1917 | "search": "", |
| 1918 | "hash": "" |
| 1919 | }, |
| 1920 | { |
| 1921 | "input": "http://example.com/foo/%2e", |
| 1922 | "base": null, |
| 1923 | "href": "http://example.com/foo/", |
| 1924 | "origin": "http://example.com", |
| 1925 | "protocol": "http:", |
| 1926 | "username": "", |
| 1927 | "password": "", |
| 1928 | "host": "example.com", |
| 1929 | "hostname": "example.com", |
| 1930 | "port": "", |
| 1931 | "pathname": "/foo/", |
| 1932 | "search": "", |
| 1933 | "hash": "" |
| 1934 | }, |
| 1935 | { |
| 1936 | "input": "http://example.com/foo/%2e%2", |
| 1937 | "base": null, |
| 1938 | "href": "http://example.com/foo/%2e%2", |
| 1939 | "origin": "http://example.com", |
| 1940 | "protocol": "http:", |
| 1941 | "username": "", |
| 1942 | "password": "", |
| 1943 | "host": "example.com", |
| 1944 | "hostname": "example.com", |
| 1945 | "port": "", |
| 1946 | "pathname": "/foo/%2e%2", |
| 1947 | "search": "", |
| 1948 | "hash": "" |
| 1949 | }, |
| 1950 | { |
| 1951 | "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar", |
| 1952 | "base": null, |
| 1953 | "href": "http://example.com/%2e.bar", |
| 1954 | "origin": "http://example.com", |
| 1955 | "protocol": "http:", |
| 1956 | "username": "", |
| 1957 | "password": "", |
| 1958 | "host": "example.com", |
| 1959 | "hostname": "example.com", |
| 1960 | "port": "", |
| 1961 | "pathname": "/%2e.bar", |
| 1962 | "search": "", |
| 1963 | "hash": "" |
| 1964 | }, |
| 1965 | { |
| 1966 | "input": "http://example.com////../..", |
| 1967 | "base": null, |
| 1968 | "href": "http://example.com//", |
| 1969 | "origin": "http://example.com", |
| 1970 | "protocol": "http:", |
| 1971 | "username": "", |
| 1972 | "password": "", |
| 1973 | "host": "example.com", |
| 1974 | "hostname": "example.com", |
| 1975 | "port": "", |
| 1976 | "pathname": "//", |
| 1977 | "search": "", |
| 1978 | "hash": "" |
| 1979 | }, |
| 1980 | { |
| 1981 | "input": "http://example.com/foo/bar//../..", |
| 1982 | "base": null, |
| 1983 | "href": "http://example.com/foo/", |
| 1984 | "origin": "http://example.com", |
| 1985 | "protocol": "http:", |
| 1986 | "username": "", |
| 1987 | "password": "", |
| 1988 | "host": "example.com", |
| 1989 | "hostname": "example.com", |
| 1990 | "port": "", |
| 1991 | "pathname": "/foo/", |
| 1992 | "search": "", |
| 1993 | "hash": "" |
| 1994 | }, |
| 1995 | { |
| 1996 | "input": "http://example.com/foo/bar//..", |
| 1997 | "base": null, |
| 1998 | "href": "http://example.com/foo/bar/", |
| 1999 | "origin": "http://example.com", |
| 2000 | "protocol": "http:", |
| 2001 | "username": "", |
| 2002 | "password": "", |
| 2003 | "host": "example.com", |
| 2004 | "hostname": "example.com", |
| 2005 | "port": "", |
| 2006 | "pathname": "/foo/bar/", |
| 2007 | "search": "", |
| 2008 | "hash": "" |
| 2009 | }, |
| 2010 | { |
| 2011 | "input": "http://example.com/foo", |
| 2012 | "base": null, |
| 2013 | "href": "http://example.com/foo", |
| 2014 | "origin": "http://example.com", |
| 2015 | "protocol": "http:", |
| 2016 | "username": "", |
| 2017 | "password": "", |
| 2018 | "host": "example.com", |
| 2019 | "hostname": "example.com", |
| 2020 | "port": "", |
| 2021 | "pathname": "/foo", |
| 2022 | "search": "", |
| 2023 | "hash": "" |
| 2024 | }, |
| 2025 | { |
| 2026 | "input": "http://example.com/%20foo", |
| 2027 | "base": null, |
| 2028 | "href": "http://example.com/%20foo", |
| 2029 | "origin": "http://example.com", |
| 2030 | "protocol": "http:", |
| 2031 | "username": "", |
| 2032 | "password": "", |
| 2033 | "host": "example.com", |
| 2034 | "hostname": "example.com", |
| 2035 | "port": "", |
| 2036 | "pathname": "/%20foo", |
| 2037 | "search": "", |
| 2038 | "hash": "" |
| 2039 | }, |
| 2040 | { |
| 2041 | "input": "http://example.com/foo%", |
| 2042 | "base": null, |
| 2043 | "href": "http://example.com/foo%", |
| 2044 | "origin": "http://example.com", |
| 2045 | "protocol": "http:", |
| 2046 | "username": "", |
| 2047 | "password": "", |
| 2048 | "host": "example.com", |
| 2049 | "hostname": "example.com", |
| 2050 | "port": "", |
| 2051 | "pathname": "/foo%", |
| 2052 | "search": "", |
| 2053 | "hash": "" |
| 2054 | }, |
| 2055 | { |
| 2056 | "input": "http://example.com/foo%2", |
| 2057 | "base": null, |
| 2058 | "href": "http://example.com/foo%2", |
| 2059 | "origin": "http://example.com", |
| 2060 | "protocol": "http:", |
| 2061 | "username": "", |
| 2062 | "password": "", |
| 2063 | "host": "example.com", |
| 2064 | "hostname": "example.com", |
| 2065 | "port": "", |
| 2066 | "pathname": "/foo%2", |
| 2067 | "search": "", |
| 2068 | "hash": "" |
| 2069 | }, |
| 2070 | { |
| 2071 | "input": "http://example.com/foo%2zbar", |
| 2072 | "base": null, |
| 2073 | "href": "http://example.com/foo%2zbar", |
| 2074 | "origin": "http://example.com", |
| 2075 | "protocol": "http:", |
| 2076 | "username": "", |
| 2077 | "password": "", |
| 2078 | "host": "example.com", |
| 2079 | "hostname": "example.com", |
| 2080 | "port": "", |
| 2081 | "pathname": "/foo%2zbar", |
| 2082 | "search": "", |
| 2083 | "hash": "" |
| 2084 | }, |
| 2085 | { |
| 2086 | "input": "http://example.com/foo%2©zbar", |
| 2087 | "base": null, |
| 2088 | "href": "http://example.com/foo%2%C3%82%C2%A9zbar", |
| 2089 | "origin": "http://example.com", |
| 2090 | "protocol": "http:", |
| 2091 | "username": "", |
| 2092 | "password": "", |
| 2093 | "host": "example.com", |
| 2094 | "hostname": "example.com", |
| 2095 | "port": "", |
| 2096 | "pathname": "/foo%2%C3%82%C2%A9zbar", |
| 2097 | "search": "", |
| 2098 | "hash": "" |
| 2099 | }, |
| 2100 | { |
| 2101 | "input": "http://example.com/foo%41%7a", |
| 2102 | "base": null, |
| 2103 | "href": "http://example.com/foo%41%7a", |
| 2104 | "origin": "http://example.com", |
| 2105 | "protocol": "http:", |
| 2106 | "username": "", |
| 2107 | "password": "", |
| 2108 | "host": "example.com", |
| 2109 | "hostname": "example.com", |
| 2110 | "port": "", |
| 2111 | "pathname": "/foo%41%7a", |
| 2112 | "search": "", |
| 2113 | "hash": "" |
| 2114 | }, |
| 2115 | { |
| 2116 | "input": "http://example.com/foo\t\u0091%91", |
| 2117 | "base": null, |
| 2118 | "href": "http://example.com/foo%C2%91%91", |
| 2119 | "origin": "http://example.com", |
| 2120 | "protocol": "http:", |
| 2121 | "username": "", |
| 2122 | "password": "", |
| 2123 | "host": "example.com", |
| 2124 | "hostname": "example.com", |
| 2125 | "port": "", |
| 2126 | "pathname": "/foo%C2%91%91", |
| 2127 | "search": "", |
| 2128 | "hash": "" |
| 2129 | }, |
| 2130 | { |
| 2131 | "input": "http://example.com/foo%00%51", |
| 2132 | "base": null, |
| 2133 | "href": "http://example.com/foo%00%51", |
| 2134 | "origin": "http://example.com", |
| 2135 | "protocol": "http:", |
| 2136 | "username": "", |
| 2137 | "password": "", |
| 2138 | "host": "example.com", |
| 2139 | "hostname": "example.com", |
| 2140 | "port": "", |
| 2141 | "pathname": "/foo%00%51", |
| 2142 | "search": "", |
| 2143 | "hash": "" |
| 2144 | }, |
| 2145 | { |
| 2146 | "input": "http://example.com/(%28:%3A%29)", |
| 2147 | "base": null, |
| 2148 | "href": "http://example.com/(%28:%3A%29)", |
| 2149 | "origin": "http://example.com", |
| 2150 | "protocol": "http:", |
| 2151 | "username": "", |
| 2152 | "password": "", |
| 2153 | "host": "example.com", |
| 2154 | "hostname": "example.com", |
| 2155 | "port": "", |
| 2156 | "pathname": "/(%28:%3A%29)", |
| 2157 | "search": "", |
| 2158 | "hash": "" |
| 2159 | }, |
| 2160 | { |
| 2161 | "input": "http://example.com/%3A%3a%3C%3c", |
| 2162 | "base": null, |
| 2163 | "href": "http://example.com/%3A%3a%3C%3c", |
| 2164 | "origin": "http://example.com", |
| 2165 | "protocol": "http:", |
| 2166 | "username": "", |
| 2167 | "password": "", |
| 2168 | "host": "example.com", |
| 2169 | "hostname": "example.com", |
| 2170 | "port": "", |
| 2171 | "pathname": "/%3A%3a%3C%3c", |
| 2172 | "search": "", |
| 2173 | "hash": "" |
| 2174 | }, |
| 2175 | { |
| 2176 | "input": "http://example.com/foo\tbar", |
| 2177 | "base": null, |
| 2178 | "href": "http://example.com/foobar", |
| 2179 | "origin": "http://example.com", |
| 2180 | "protocol": "http:", |
| 2181 | "username": "", |
| 2182 | "password": "", |
| 2183 | "host": "example.com", |
| 2184 | "hostname": "example.com", |
| 2185 | "port": "", |
| 2186 | "pathname": "/foobar", |
| 2187 | "search": "", |
| 2188 | "hash": "" |
| 2189 | }, |
| 2190 | { |
| 2191 | "input": "http://example.com\\\\foo\\\\bar", |
| 2192 | "base": null, |
| 2193 | "href": "http://example.com//foo//bar", |
| 2194 | "origin": "http://example.com", |
| 2195 | "protocol": "http:", |
| 2196 | "username": "", |
| 2197 | "password": "", |
| 2198 | "host": "example.com", |
| 2199 | "hostname": "example.com", |
| 2200 | "port": "", |
| 2201 | "pathname": "//foo//bar", |
| 2202 | "search": "", |
| 2203 | "hash": "" |
| 2204 | }, |
| 2205 | { |
| 2206 | "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd", |
| 2207 | "base": null, |
| 2208 | "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd", |
| 2209 | "origin": "http://example.com", |
| 2210 | "protocol": "http:", |
| 2211 | "username": "", |
| 2212 | "password": "", |
| 2213 | "host": "example.com", |
| 2214 | "hostname": "example.com", |
| 2215 | "port": "", |
| 2216 | "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd", |
| 2217 | "search": "", |
| 2218 | "hash": "" |
| 2219 | }, |
| 2220 | { |
| 2221 | "input": "http://example.com/@asdf%40", |
| 2222 | "base": null, |
| 2223 | "href": "http://example.com/@asdf%40", |
| 2224 | "origin": "http://example.com", |
| 2225 | "protocol": "http:", |
| 2226 | "username": "", |
| 2227 | "password": "", |
| 2228 | "host": "example.com", |
| 2229 | "hostname": "example.com", |
| 2230 | "port": "", |
| 2231 | "pathname": "/@asdf%40", |
| 2232 | "search": "", |
| 2233 | "hash": "" |
| 2234 | }, |
| 2235 | { |
| 2236 | "input": "http://example.com/你好你好", |
| 2237 | "base": null, |
| 2238 | "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD", |
| 2239 | "origin": "http://example.com", |
| 2240 | "protocol": "http:", |
| 2241 | "username": "", |
| 2242 | "password": "", |
| 2243 | "host": "example.com", |
| 2244 | "hostname": "example.com", |
| 2245 | "port": "", |
| 2246 | "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD", |
| 2247 | "search": "", |
| 2248 | "hash": "" |
| 2249 | }, |
| 2250 | { |
| 2251 | "input": "http://example.com/‥/foo", |
| 2252 | "base": null, |
| 2253 | "href": "http://example.com/%E2%80%A5/foo", |
| 2254 | "origin": "http://example.com", |
| 2255 | "protocol": "http:", |
| 2256 | "username": "", |
| 2257 | "password": "", |
| 2258 | "host": "example.com", |
| 2259 | "hostname": "example.com", |
| 2260 | "port": "", |
| 2261 | "pathname": "/%E2%80%A5/foo", |
| 2262 | "search": "", |
| 2263 | "hash": "" |
| 2264 | }, |
| 2265 | { |
| 2266 | "input": "http://example.com//foo", |
| 2267 | "base": null, |
| 2268 | "href": "http://example.com/%EF%BB%BF/foo", |
| 2269 | "origin": "http://example.com", |
| 2270 | "protocol": "http:", |
| 2271 | "username": "", |
| 2272 | "password": "", |
| 2273 | "host": "example.com", |
| 2274 | "hostname": "example.com", |
| 2275 | "port": "", |
| 2276 | "pathname": "/%EF%BB%BF/foo", |
| 2277 | "search": "", |
| 2278 | "hash": "" |
| 2279 | }, |
| 2280 | { |
| 2281 | "input": "http://example.com//foo//bar", |
| 2282 | "base": null, |
| 2283 | "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar", |
| 2284 | "origin": "http://example.com", |
| 2285 | "protocol": "http:", |
| 2286 | "username": "", |
| 2287 | "password": "", |
| 2288 | "host": "example.com", |
| 2289 | "hostname": "example.com", |
| 2290 | "port": "", |
| 2291 | "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar", |
| 2292 | "search": "", |
| 2293 | "hash": "" |
| 2294 | }, |
| 2295 | "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js", |
| 2296 | { |
| 2297 | "input": "http://www.google.com/foo?bar=baz#", |
| 2298 | "base": null, |
| 2299 | "href": "http://www.google.com/foo?bar=baz#", |
| 2300 | "origin": "http://www.google.com", |
| 2301 | "protocol": "http:", |
| 2302 | "username": "", |
| 2303 | "password": "", |
| 2304 | "host": "www.google.com", |
| 2305 | "hostname": "www.google.com", |
| 2306 | "port": "", |
| 2307 | "pathname": "/foo", |
| 2308 | "search": "?bar=baz", |
| 2309 | "hash": "" |
| 2310 | }, |
| 2311 | { |
| 2312 | "input": "http://www.google.com/foo?bar=baz# »", |
| 2313 | "base": null, |
| 2314 | "href": "http://www.google.com/foo?bar=baz#%20%C2%BB", |
| 2315 | "origin": "http://www.google.com", |
| 2316 | "protocol": "http:", |
| 2317 | "username": "", |
| 2318 | "password": "", |
| 2319 | "host": "www.google.com", |
| 2320 | "hostname": "www.google.com", |
| 2321 | "port": "", |
| 2322 | "pathname": "/foo", |
| 2323 | "search": "?bar=baz", |
| 2324 | "hash": "#%20%C2%BB" |
| 2325 | }, |
| 2326 | { |
| 2327 | "input": "data:test# »", |
| 2328 | "base": null, |
| 2329 | "href": "data:test#%20%C2%BB", |
| 2330 | "origin": "null", |
| 2331 | "protocol": "data:", |
| 2332 | "username": "", |
| 2333 | "password": "", |
| 2334 | "host": "", |
| 2335 | "hostname": "", |
| 2336 | "port": "", |
| 2337 | "pathname": "test", |
| 2338 | "search": "", |
| 2339 | "hash": "#%20%C2%BB" |
| 2340 | }, |
| 2341 | { |
| 2342 | "input": "http://www.google.com", |
| 2343 | "base": null, |
| 2344 | "href": "http://www.google.com/", |
| 2345 | "origin": "http://www.google.com", |
| 2346 | "protocol": "http:", |
| 2347 | "username": "", |
| 2348 | "password": "", |
| 2349 | "host": "www.google.com", |
| 2350 | "hostname": "www.google.com", |
| 2351 | "port": "", |
| 2352 | "pathname": "/", |
| 2353 | "search": "", |
| 2354 | "hash": "" |
| 2355 | }, |
| 2356 | { |
| 2357 | "input": "http://192.0x00A80001", |
| 2358 | "base": null, |
| 2359 | "href": "http://192.168.0.1/", |
| 2360 | "origin": "http://192.168.0.1", |
| 2361 | "protocol": "http:", |
| 2362 | "username": "", |
| 2363 | "password": "", |
| 2364 | "host": "192.168.0.1", |
| 2365 | "hostname": "192.168.0.1", |
| 2366 | "port": "", |
| 2367 | "pathname": "/", |
| 2368 | "search": "", |
| 2369 | "hash": "" |
| 2370 | }, |
| 2371 | { |
| 2372 | "input": "http://www/foo%2Ehtml", |
| 2373 | "base": null, |
| 2374 | "href": "http://www/foo%2Ehtml", |
| 2375 | "origin": "http://www", |
| 2376 | "protocol": "http:", |
| 2377 | "username": "", |
| 2378 | "password": "", |
| 2379 | "host": "www", |
| 2380 | "hostname": "www", |
| 2381 | "port": "", |
| 2382 | "pathname": "/foo%2Ehtml", |
| 2383 | "search": "", |
| 2384 | "hash": "" |
| 2385 | }, |
| 2386 | { |
| 2387 | "input": "http://www/foo/%2E/html", |
| 2388 | "base": null, |
| 2389 | "href": "http://www/foo/html", |
| 2390 | "origin": "http://www", |
| 2391 | "protocol": "http:", |
| 2392 | "username": "", |
| 2393 | "password": "", |
| 2394 | "host": "www", |
| 2395 | "hostname": "www", |
| 2396 | "port": "", |
| 2397 | "pathname": "/foo/html", |
| 2398 | "search": "", |
| 2399 | "hash": "" |
| 2400 | }, |
| 2401 | { |
| 2402 | "input": "http://user:pass@/", |
| 2403 | "base": null, |
| 2404 | "failure": true |
| 2405 | }, |
| 2406 | { |
| 2407 | "input": "http://%25DOMAIN:[email protected]/", |
| 2408 | "base": null, |
| 2409 | "href": "http://%25DOMAIN:[email protected]/", |
| 2410 | "origin": "http://foodomain.com", |
| 2411 | "protocol": "http:", |
| 2412 | "username": "%25DOMAIN", |
| 2413 | "password": "foobar", |
| 2414 | "host": "foodomain.com", |
| 2415 | "hostname": "foodomain.com", |
| 2416 | "port": "", |
| 2417 | "pathname": "/", |
| 2418 | "search": "", |
| 2419 | "hash": "" |
| 2420 | }, |
| 2421 | { |
| 2422 | "input": "http:\\\\www.google.com\\foo", |
| 2423 | "base": null, |
| 2424 | "href": "http://www.google.com/foo", |
| 2425 | "origin": "http://www.google.com", |
| 2426 | "protocol": "http:", |
| 2427 | "username": "", |
| 2428 | "password": "", |
| 2429 | "host": "www.google.com", |
| 2430 | "hostname": "www.google.com", |
| 2431 | "port": "", |
| 2432 | "pathname": "/foo", |
| 2433 | "search": "", |
| 2434 | "hash": "" |
| 2435 | }, |
| 2436 | { |
| 2437 | "input": "http://foo:80/", |
| 2438 | "base": null, |
| 2439 | "href": "http://foo/", |
| 2440 | "origin": "http://foo", |
| 2441 | "protocol": "http:", |
| 2442 | "username": "", |
| 2443 | "password": "", |
| 2444 | "host": "foo", |
| 2445 | "hostname": "foo", |
| 2446 | "port": "", |
| 2447 | "pathname": "/", |
| 2448 | "search": "", |
| 2449 | "hash": "" |
| 2450 | }, |
| 2451 | { |
| 2452 | "input": "http://foo:81/", |
| 2453 | "base": null, |
| 2454 | "href": "http://foo:81/", |
| 2455 | "origin": "http://foo:81", |
| 2456 | "protocol": "http:", |
| 2457 | "username": "", |
| 2458 | "password": "", |
| 2459 | "host": "foo:81", |
| 2460 | "hostname": "foo", |
| 2461 | "port": "81", |
| 2462 | "pathname": "/", |
| 2463 | "search": "", |
| 2464 | "hash": "" |
| 2465 | }, |
| 2466 | { |
| 2467 | "input": "httpa://foo:80/", |
| 2468 | "base": null, |
| 2469 | "href": "httpa://foo:80/", |
| 2470 | "origin": "null", |
| 2471 | "protocol": "httpa:", |
| 2472 | "username": "", |
| 2473 | "password": "", |
| 2474 | "host": "foo:80", |
| 2475 | "hostname": "foo", |
| 2476 | "port": "80", |
| 2477 | "pathname": "/", |
| 2478 | "search": "", |
| 2479 | "hash": "" |
| 2480 | }, |
| 2481 | { |
| 2482 | "input": "http://foo:-80/", |
| 2483 | "base": null, |
| 2484 | "failure": true |
| 2485 | }, |
| 2486 | { |
| 2487 | "input": "https://foo:443/", |
| 2488 | "base": null, |
| 2489 | "href": "https://foo/", |
| 2490 | "origin": "https://foo", |
| 2491 | "protocol": "https:", |
| 2492 | "username": "", |
| 2493 | "password": "", |
| 2494 | "host": "foo", |
| 2495 | "hostname": "foo", |
| 2496 | "port": "", |
| 2497 | "pathname": "/", |
| 2498 | "search": "", |
| 2499 | "hash": "" |
| 2500 | }, |
| 2501 | { |
| 2502 | "input": "https://foo:80/", |
| 2503 | "base": null, |
| 2504 | "href": "https://foo:80/", |
| 2505 | "origin": "https://foo:80", |
| 2506 | "protocol": "https:", |
| 2507 | "username": "", |
| 2508 | "password": "", |
| 2509 | "host": "foo:80", |
| 2510 | "hostname": "foo", |
| 2511 | "port": "80", |
| 2512 | "pathname": "/", |
| 2513 | "search": "", |
| 2514 | "hash": "" |
| 2515 | }, |
| 2516 | { |
| 2517 | "input": "ftp://foo:21/", |
| 2518 | "base": null, |
| 2519 | "href": "ftp://foo/", |
| 2520 | "origin": "ftp://foo", |
| 2521 | "protocol": "ftp:", |
| 2522 | "username": "", |
| 2523 | "password": "", |
| 2524 | "host": "foo", |
| 2525 | "hostname": "foo", |
| 2526 | "port": "", |
| 2527 | "pathname": "/", |
| 2528 | "search": "", |
| 2529 | "hash": "" |
| 2530 | }, |
| 2531 | { |
| 2532 | "input": "ftp://foo:80/", |
| 2533 | "base": null, |
| 2534 | "href": "ftp://foo:80/", |
| 2535 | "origin": "ftp://foo:80", |
| 2536 | "protocol": "ftp:", |
| 2537 | "username": "", |
| 2538 | "password": "", |
| 2539 | "host": "foo:80", |
| 2540 | "hostname": "foo", |
| 2541 | "port": "80", |
| 2542 | "pathname": "/", |
| 2543 | "search": "", |
| 2544 | "hash": "" |
| 2545 | }, |
| 2546 | { |
| 2547 | "input": "gopher://foo:70/", |
| 2548 | "base": null, |
| 2549 | "href": "gopher://foo:70/", |
| 2550 | "origin": "null", |
| 2551 | "protocol": "gopher:", |
| 2552 | "username": "", |
| 2553 | "password": "", |
| 2554 | "host": "foo:70", |
| 2555 | "hostname": "foo", |
| 2556 | "port": "70", |
| 2557 | "pathname": "/", |
| 2558 | "search": "", |
| 2559 | "hash": "" |
| 2560 | }, |
| 2561 | { |
| 2562 | "input": "gopher://foo:443/", |
| 2563 | "base": null, |
| 2564 | "href": "gopher://foo:443/", |
| 2565 | "origin": "null", |
| 2566 | "protocol": "gopher:", |
| 2567 | "username": "", |
| 2568 | "password": "", |
| 2569 | "host": "foo:443", |
| 2570 | "hostname": "foo", |
| 2571 | "port": "443", |
| 2572 | "pathname": "/", |
| 2573 | "search": "", |
| 2574 | "hash": "" |
| 2575 | }, |
| 2576 | { |
| 2577 | "input": "ws://foo:80/", |
| 2578 | "base": null, |
| 2579 | "href": "ws://foo/", |
| 2580 | "origin": "ws://foo", |
| 2581 | "protocol": "ws:", |
| 2582 | "username": "", |
| 2583 | "password": "", |
| 2584 | "host": "foo", |
| 2585 | "hostname": "foo", |
| 2586 | "port": "", |
| 2587 | "pathname": "/", |
| 2588 | "search": "", |
| 2589 | "hash": "" |
| 2590 | }, |
| 2591 | { |
| 2592 | "input": "ws://foo:81/", |
| 2593 | "base": null, |
| 2594 | "href": "ws://foo:81/", |
| 2595 | "origin": "ws://foo:81", |
| 2596 | "protocol": "ws:", |
| 2597 | "username": "", |
| 2598 | "password": "", |
| 2599 | "host": "foo:81", |
| 2600 | "hostname": "foo", |
| 2601 | "port": "81", |
| 2602 | "pathname": "/", |
| 2603 | "search": "", |
| 2604 | "hash": "" |
| 2605 | }, |
| 2606 | { |
| 2607 | "input": "ws://foo:443/", |
| 2608 | "base": null, |
| 2609 | "href": "ws://foo:443/", |
| 2610 | "origin": "ws://foo:443", |
| 2611 | "protocol": "ws:", |
| 2612 | "username": "", |
| 2613 | "password": "", |
| 2614 | "host": "foo:443", |
| 2615 | "hostname": "foo", |
| 2616 | "port": "443", |
| 2617 | "pathname": "/", |
| 2618 | "search": "", |
| 2619 | "hash": "" |
| 2620 | }, |
| 2621 | { |
| 2622 | "input": "ws://foo:815/", |
| 2623 | "base": null, |
| 2624 | "href": "ws://foo:815/", |
| 2625 | "origin": "ws://foo:815", |
| 2626 | "protocol": "ws:", |
| 2627 | "username": "", |
| 2628 | "password": "", |
| 2629 | "host": "foo:815", |
| 2630 | "hostname": "foo", |
| 2631 | "port": "815", |
| 2632 | "pathname": "/", |
| 2633 | "search": "", |
| 2634 | "hash": "" |
| 2635 | }, |
| 2636 | { |
| 2637 | "input": "wss://foo:80/", |
| 2638 | "base": null, |
| 2639 | "href": "wss://foo:80/", |
| 2640 | "origin": "wss://foo:80", |
| 2641 | "protocol": "wss:", |
| 2642 | "username": "", |
| 2643 | "password": "", |
| 2644 | "host": "foo:80", |
| 2645 | "hostname": "foo", |
| 2646 | "port": "80", |
| 2647 | "pathname": "/", |
| 2648 | "search": "", |
| 2649 | "hash": "" |
| 2650 | }, |
| 2651 | { |
| 2652 | "input": "wss://foo:81/", |
| 2653 | "base": null, |
| 2654 | "href": "wss://foo:81/", |
| 2655 | "origin": "wss://foo:81", |
| 2656 | "protocol": "wss:", |
| 2657 | "username": "", |
| 2658 | "password": "", |
| 2659 | "host": "foo:81", |
| 2660 | "hostname": "foo", |
| 2661 | "port": "81", |
| 2662 | "pathname": "/", |
| 2663 | "search": "", |
| 2664 | "hash": "" |
| 2665 | }, |
| 2666 | { |
| 2667 | "input": "wss://foo:443/", |
| 2668 | "base": null, |
| 2669 | "href": "wss://foo/", |
| 2670 | "origin": "wss://foo", |
| 2671 | "protocol": "wss:", |
| 2672 | "username": "", |
| 2673 | "password": "", |
| 2674 | "host": "foo", |
| 2675 | "hostname": "foo", |
| 2676 | "port": "", |
| 2677 | "pathname": "/", |
| 2678 | "search": "", |
| 2679 | "hash": "" |
| 2680 | }, |
| 2681 | { |
| 2682 | "input": "wss://foo:815/", |
| 2683 | "base": null, |
| 2684 | "href": "wss://foo:815/", |
| 2685 | "origin": "wss://foo:815", |
| 2686 | "protocol": "wss:", |
| 2687 | "username": "", |
| 2688 | "password": "", |
| 2689 | "host": "foo:815", |
| 2690 | "hostname": "foo", |
| 2691 | "port": "815", |
| 2692 | "pathname": "/", |
| 2693 | "search": "", |
| 2694 | "hash": "" |
| 2695 | }, |
| 2696 | { |
| 2697 | "input": "http:/example.com/", |
| 2698 | "base": null, |
| 2699 | "href": "http://example.com/", |
| 2700 | "origin": "http://example.com", |
| 2701 | "protocol": "http:", |
| 2702 | "username": "", |
| 2703 | "password": "", |
| 2704 | "host": "example.com", |
| 2705 | "hostname": "example.com", |
| 2706 | "port": "", |
| 2707 | "pathname": "/", |
| 2708 | "search": "", |
| 2709 | "hash": "" |
| 2710 | }, |
| 2711 | { |
| 2712 | "input": "ftp:/example.com/", |
| 2713 | "base": null, |
| 2714 | "href": "ftp://example.com/", |
| 2715 | "origin": "ftp://example.com", |
| 2716 | "protocol": "ftp:", |
| 2717 | "username": "", |
| 2718 | "password": "", |
| 2719 | "host": "example.com", |
| 2720 | "hostname": "example.com", |
| 2721 | "port": "", |
| 2722 | "pathname": "/", |
| 2723 | "search": "", |
| 2724 | "hash": "" |
| 2725 | }, |
| 2726 | { |
| 2727 | "input": "https:/example.com/", |
| 2728 | "base": null, |
| 2729 | "href": "https://example.com/", |
| 2730 | "origin": "https://example.com", |
| 2731 | "protocol": "https:", |
| 2732 | "username": "", |
| 2733 | "password": "", |
| 2734 | "host": "example.com", |
| 2735 | "hostname": "example.com", |
| 2736 | "port": "", |
| 2737 | "pathname": "/", |
| 2738 | "search": "", |
| 2739 | "hash": "" |
| 2740 | }, |
| 2741 | { |
| 2742 | "input": "madeupscheme:/example.com/", |
| 2743 | "base": null, |
| 2744 | "href": "madeupscheme:/example.com/", |
| 2745 | "origin": "null", |
| 2746 | "protocol": "madeupscheme:", |
| 2747 | "username": "", |
| 2748 | "password": "", |
| 2749 | "host": "", |
| 2750 | "hostname": "", |
| 2751 | "port": "", |
| 2752 | "pathname": "/example.com/", |
| 2753 | "search": "", |
| 2754 | "hash": "" |
| 2755 | }, |
| 2756 | { |
| 2757 | "input": "file:/example.com/", |
| 2758 | "base": null, |
| 2759 | "href": "file:///example.com/", |
| 2760 | "protocol": "file:", |
| 2761 | "username": "", |
| 2762 | "password": "", |
| 2763 | "host": "", |
| 2764 | "hostname": "", |
| 2765 | "port": "", |
| 2766 | "pathname": "/example.com/", |
| 2767 | "search": "", |
| 2768 | "hash": "" |
| 2769 | }, |
| 2770 | { |
| 2771 | "input": "ftps:/example.com/", |
| 2772 | "base": null, |
| 2773 | "href": "ftps:/example.com/", |
| 2774 | "origin": "null", |
| 2775 | "protocol": "ftps:", |
| 2776 | "username": "", |
| 2777 | "password": "", |
| 2778 | "host": "", |
| 2779 | "hostname": "", |
| 2780 | "port": "", |
| 2781 | "pathname": "/example.com/", |
| 2782 | "search": "", |
| 2783 | "hash": "" |
| 2784 | }, |
| 2785 | { |
| 2786 | "input": "gopher:/example.com/", |
| 2787 | "base": null, |
| 2788 | "href": "gopher:/example.com/", |
| 2789 | "origin": "null", |
| 2790 | "protocol": "gopher:", |
| 2791 | "username": "", |
| 2792 | "password": "", |
| 2793 | "host": "", |
| 2794 | "hostname": "", |
| 2795 | "port": "", |
| 2796 | "pathname": "/example.com/", |
| 2797 | "search": "", |
| 2798 | "hash": "" |
| 2799 | }, |
| 2800 | { |
| 2801 | "input": "ws:/example.com/", |
| 2802 | "base": null, |
| 2803 | "href": "ws://example.com/", |
| 2804 | "origin": "ws://example.com", |
| 2805 | "protocol": "ws:", |
| 2806 | "username": "", |
| 2807 | "password": "", |
| 2808 | "host": "example.com", |
| 2809 | "hostname": "example.com", |
| 2810 | "port": "", |
| 2811 | "pathname": "/", |
| 2812 | "search": "", |
| 2813 | "hash": "" |
| 2814 | }, |
| 2815 | { |
| 2816 | "input": "wss:/example.com/", |
| 2817 | "base": null, |
| 2818 | "href": "wss://example.com/", |
| 2819 | "origin": "wss://example.com", |
| 2820 | "protocol": "wss:", |
| 2821 | "username": "", |
| 2822 | "password": "", |
| 2823 | "host": "example.com", |
| 2824 | "hostname": "example.com", |
| 2825 | "port": "", |
| 2826 | "pathname": "/", |
| 2827 | "search": "", |
| 2828 | "hash": "" |
| 2829 | }, |
| 2830 | { |
| 2831 | "input": "data:/example.com/", |
| 2832 | "base": null, |
| 2833 | "href": "data:/example.com/", |
| 2834 | "origin": "null", |
| 2835 | "protocol": "data:", |
| 2836 | "username": "", |
| 2837 | "password": "", |
| 2838 | "host": "", |
| 2839 | "hostname": "", |
| 2840 | "port": "", |
| 2841 | "pathname": "/example.com/", |
| 2842 | "search": "", |
| 2843 | "hash": "" |
| 2844 | }, |
| 2845 | { |
| 2846 | "input": "javascript:/example.com/", |
| 2847 | "base": null, |
| 2848 | "href": "javascript:/example.com/", |
| 2849 | "origin": "null", |
| 2850 | "protocol": "javascript:", |
| 2851 | "username": "", |
| 2852 | "password": "", |
| 2853 | "host": "", |
| 2854 | "hostname": "", |
| 2855 | "port": "", |
| 2856 | "pathname": "/example.com/", |
| 2857 | "search": "", |
| 2858 | "hash": "" |
| 2859 | }, |
| 2860 | { |
| 2861 | "input": "mailto:/example.com/", |
| 2862 | "base": null, |
| 2863 | "href": "mailto:/example.com/", |
| 2864 | "origin": "null", |
| 2865 | "protocol": "mailto:", |
| 2866 | "username": "", |
| 2867 | "password": "", |
| 2868 | "host": "", |
| 2869 | "hostname": "", |
| 2870 | "port": "", |
| 2871 | "pathname": "/example.com/", |
| 2872 | "search": "", |
| 2873 | "hash": "" |
| 2874 | }, |
| 2875 | { |
| 2876 | "input": "http:example.com/", |
| 2877 | "base": null, |
| 2878 | "href": "http://example.com/", |
| 2879 | "origin": "http://example.com", |
| 2880 | "protocol": "http:", |
| 2881 | "username": "", |
| 2882 | "password": "", |
| 2883 | "host": "example.com", |
| 2884 | "hostname": "example.com", |
| 2885 | "port": "", |
| 2886 | "pathname": "/", |
| 2887 | "search": "", |
| 2888 | "hash": "" |
| 2889 | }, |
| 2890 | { |
| 2891 | "input": "ftp:example.com/", |
| 2892 | "base": null, |
| 2893 | "href": "ftp://example.com/", |
| 2894 | "origin": "ftp://example.com", |
| 2895 | "protocol": "ftp:", |
| 2896 | "username": "", |
| 2897 | "password": "", |
| 2898 | "host": "example.com", |
| 2899 | "hostname": "example.com", |
| 2900 | "port": "", |
| 2901 | "pathname": "/", |
| 2902 | "search": "", |
| 2903 | "hash": "" |
| 2904 | }, |
| 2905 | { |
| 2906 | "input": "https:example.com/", |
| 2907 | "base": null, |
| 2908 | "href": "https://example.com/", |
| 2909 | "origin": "https://example.com", |
| 2910 | "protocol": "https:", |
| 2911 | "username": "", |
| 2912 | "password": "", |
| 2913 | "host": "example.com", |
| 2914 | "hostname": "example.com", |
| 2915 | "port": "", |
| 2916 | "pathname": "/", |
| 2917 | "search": "", |
| 2918 | "hash": "" |
| 2919 | }, |
| 2920 | { |
| 2921 | "input": "madeupscheme:example.com/", |
| 2922 | "base": null, |
| 2923 | "href": "madeupscheme:example.com/", |
| 2924 | "origin": "null", |
| 2925 | "protocol": "madeupscheme:", |
| 2926 | "username": "", |
| 2927 | "password": "", |
| 2928 | "host": "", |
| 2929 | "hostname": "", |
| 2930 | "port": "", |
| 2931 | "pathname": "example.com/", |
| 2932 | "search": "", |
| 2933 | "hash": "" |
| 2934 | }, |
| 2935 | { |
| 2936 | "input": "ftps:example.com/", |
| 2937 | "base": null, |
| 2938 | "href": "ftps:example.com/", |
| 2939 | "origin": "null", |
| 2940 | "protocol": "ftps:", |
| 2941 | "username": "", |
| 2942 | "password": "", |
| 2943 | "host": "", |
| 2944 | "hostname": "", |
| 2945 | "port": "", |
| 2946 | "pathname": "example.com/", |
| 2947 | "search": "", |
| 2948 | "hash": "" |
| 2949 | }, |
| 2950 | { |
| 2951 | "input": "gopher:example.com/", |
| 2952 | "base": null, |
| 2953 | "href": "gopher:example.com/", |
| 2954 | "origin": "null", |
| 2955 | "protocol": "gopher:", |
| 2956 | "username": "", |
| 2957 | "password": "", |
| 2958 | "host": "", |
| 2959 | "hostname": "", |
| 2960 | "port": "", |
| 2961 | "pathname": "example.com/", |
| 2962 | "search": "", |
| 2963 | "hash": "" |
| 2964 | }, |
| 2965 | { |
| 2966 | "input": "ws:example.com/", |
| 2967 | "base": null, |
| 2968 | "href": "ws://example.com/", |
| 2969 | "origin": "ws://example.com", |
| 2970 | "protocol": "ws:", |
| 2971 | "username": "", |
| 2972 | "password": "", |
| 2973 | "host": "example.com", |
| 2974 | "hostname": "example.com", |
| 2975 | "port": "", |
| 2976 | "pathname": "/", |
| 2977 | "search": "", |
| 2978 | "hash": "" |
| 2979 | }, |
| 2980 | { |
| 2981 | "input": "wss:example.com/", |
| 2982 | "base": null, |
| 2983 | "href": "wss://example.com/", |
| 2984 | "origin": "wss://example.com", |
| 2985 | "protocol": "wss:", |
| 2986 | "username": "", |
| 2987 | "password": "", |
| 2988 | "host": "example.com", |
| 2989 | "hostname": "example.com", |
| 2990 | "port": "", |
| 2991 | "pathname": "/", |
| 2992 | "search": "", |
| 2993 | "hash": "" |
| 2994 | }, |
| 2995 | { |
| 2996 | "input": "data:example.com/", |
| 2997 | "base": null, |
| 2998 | "href": "data:example.com/", |
| 2999 | "origin": "null", |
| 3000 | "protocol": "data:", |
| 3001 | "username": "", |
| 3002 | "password": "", |
| 3003 | "host": "", |
| 3004 | "hostname": "", |
| 3005 | "port": "", |
| 3006 | "pathname": "example.com/", |
| 3007 | "search": "", |
| 3008 | "hash": "" |
| 3009 | }, |
| 3010 | { |
| 3011 | "input": "javascript:example.com/", |
| 3012 | "base": null, |
| 3013 | "href": "javascript:example.com/", |
| 3014 | "origin": "null", |
| 3015 | "protocol": "javascript:", |
| 3016 | "username": "", |
| 3017 | "password": "", |
| 3018 | "host": "", |
| 3019 | "hostname": "", |
| 3020 | "port": "", |
| 3021 | "pathname": "example.com/", |
| 3022 | "search": "", |
| 3023 | "hash": "" |
| 3024 | }, |
| 3025 | { |
| 3026 | "input": "mailto:example.com/", |
| 3027 | "base": null, |
| 3028 | "href": "mailto:example.com/", |
| 3029 | "origin": "null", |
| 3030 | "protocol": "mailto:", |
| 3031 | "username": "", |
| 3032 | "password": "", |
| 3033 | "host": "", |
| 3034 | "hostname": "", |
| 3035 | "port": "", |
| 3036 | "pathname": "example.com/", |
| 3037 | "search": "", |
| 3038 | "hash": "" |
| 3039 | }, |
| 3040 | "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html", |
| 3041 | { |
| 3042 | "input": "http:@www.example.com", |
| 3043 | "base": null, |
| 3044 | "href": "http://www.example.com/", |
| 3045 | "origin": "http://www.example.com", |
| 3046 | "protocol": "http:", |
| 3047 | "username": "", |
| 3048 | "password": "", |
| 3049 | "host": "www.example.com", |
| 3050 | "hostname": "www.example.com", |
| 3051 | "port": "", |
| 3052 | "pathname": "/", |
| 3053 | "search": "", |
| 3054 | "hash": "" |
| 3055 | }, |
| 3056 | { |
| 3057 | "input": "http:/@www.example.com", |
| 3058 | "base": null, |
| 3059 | "href": "http://www.example.com/", |
| 3060 | "origin": "http://www.example.com", |
| 3061 | "protocol": "http:", |
| 3062 | "username": "", |
| 3063 | "password": "", |
| 3064 | "host": "www.example.com", |
| 3065 | "hostname": "www.example.com", |
| 3066 | "port": "", |
| 3067 | "pathname": "/", |
| 3068 | "search": "", |
| 3069 | "hash": "" |
| 3070 | }, |
| 3071 | { |
| 3072 | "input": "http://@www.example.com", |
| 3073 | "base": null, |
| 3074 | "href": "http://www.example.com/", |
| 3075 | "origin": "http://www.example.com", |
| 3076 | "protocol": "http:", |
| 3077 | "username": "", |
| 3078 | "password": "", |
| 3079 | "host": "www.example.com", |
| 3080 | "hostname": "www.example.com", |
| 3081 | "port": "", |
| 3082 | "pathname": "/", |
| 3083 | "search": "", |
| 3084 | "hash": "" |
| 3085 | }, |
| 3086 | { |
| 3087 | "input": "http:a:[email protected]", |
| 3088 | "base": null, |
| 3089 | "href": "http://a:[email protected]/", |
| 3090 | "origin": "http://www.example.com", |
| 3091 | "protocol": "http:", |
| 3092 | "username": "a", |
| 3093 | "password": "b", |
| 3094 | "host": "www.example.com", |
| 3095 | "hostname": "www.example.com", |
| 3096 | "port": "", |
| 3097 | "pathname": "/", |
| 3098 | "search": "", |
| 3099 | "hash": "" |
| 3100 | }, |
| 3101 | { |
| 3102 | "input": "http:/a:[email protected]", |
| 3103 | "base": null, |
| 3104 | "href": "http://a:[email protected]/", |
| 3105 | "origin": "http://www.example.com", |
| 3106 | "protocol": "http:", |
| 3107 | "username": "a", |
| 3108 | "password": "b", |
| 3109 | "host": "www.example.com", |
| 3110 | "hostname": "www.example.com", |
| 3111 | "port": "", |
| 3112 | "pathname": "/", |
| 3113 | "search": "", |
| 3114 | "hash": "" |
| 3115 | }, |
| 3116 | { |
| 3117 | "input": "http://a:[email protected]", |
| 3118 | "base": null, |
| 3119 | "href": "http://a:[email protected]/", |
| 3120 | "origin": "http://www.example.com", |
| 3121 | "protocol": "http:", |
| 3122 | "username": "a", |
| 3123 | "password": "b", |
| 3124 | "host": "www.example.com", |
| 3125 | "hostname": "www.example.com", |
| 3126 | "port": "", |
| 3127 | "pathname": "/", |
| 3128 | "search": "", |
| 3129 | "hash": "" |
| 3130 | }, |
| 3131 | { |
| 3132 | "input": "http://@pple.com", |
| 3133 | "base": null, |
| 3134 | "href": "http://pple.com/", |
| 3135 | "origin": "http://pple.com", |
| 3136 | "protocol": "http:", |
| 3137 | "username": "", |
| 3138 | "password": "", |
| 3139 | "host": "pple.com", |
| 3140 | "hostname": "pple.com", |
| 3141 | "port": "", |
| 3142 | "pathname": "/", |
| 3143 | "search": "", |
| 3144 | "hash": "" |
| 3145 | }, |
| 3146 | { |
| 3147 | "input": "http::[email protected]", |
| 3148 | "base": null, |
| 3149 | "href": "http://:[email protected]/", |
| 3150 | "origin": "http://www.example.com", |
| 3151 | "protocol": "http:", |
| 3152 | "username": "", |
| 3153 | "password": "b", |
| 3154 | "host": "www.example.com", |
| 3155 | "hostname": "www.example.com", |
| 3156 | "port": "", |
| 3157 | "pathname": "/", |
| 3158 | "search": "", |
| 3159 | "hash": "" |
| 3160 | }, |
| 3161 | { |
| 3162 | "input": "http:/:[email protected]", |
| 3163 | "base": null, |
| 3164 | "href": "http://:[email protected]/", |
| 3165 | "origin": "http://www.example.com", |
| 3166 | "protocol": "http:", |
| 3167 | "username": "", |
| 3168 | "password": "b", |
| 3169 | "host": "www.example.com", |
| 3170 | "hostname": "www.example.com", |
| 3171 | "port": "", |
| 3172 | "pathname": "/", |
| 3173 | "search": "", |
| 3174 | "hash": "" |
| 3175 | }, |
| 3176 | { |
| 3177 | "input": "http://:[email protected]", |
| 3178 | "base": null, |
| 3179 | "href": "http://:[email protected]/", |
| 3180 | "origin": "http://www.example.com", |
| 3181 | "protocol": "http:", |
| 3182 | "username": "", |
| 3183 | "password": "b", |
| 3184 | "host": "www.example.com", |
| 3185 | "hostname": "www.example.com", |
| 3186 | "port": "", |
| 3187 | "pathname": "/", |
| 3188 | "search": "", |
| 3189 | "hash": "" |
| 3190 | }, |
| 3191 | { |
| 3192 | "input": "http:/:@/www.example.com", |
| 3193 | "base": null, |
| 3194 | "failure": true, |
| 3195 | "relativeTo": "non-opaque-path-base" |
| 3196 | }, |
| 3197 | { |
| 3198 | "input": "http://user@/www.example.com", |
| 3199 | "base": null, |
| 3200 | "failure": true |
| 3201 | }, |
| 3202 | { |
| 3203 | "input": "http:@/www.example.com", |
| 3204 | "base": null, |
| 3205 | "failure": true, |
| 3206 | "relativeTo": "non-opaque-path-base" |
| 3207 | }, |
| 3208 | { |
| 3209 | "input": "http:/@/www.example.com", |
| 3210 | "base": null, |
| 3211 | "failure": true, |
| 3212 | "relativeTo": "non-opaque-path-base" |
| 3213 | }, |
| 3214 | { |
| 3215 | "input": "http://@/www.example.com", |
| 3216 | "base": null, |
| 3217 | "failure": true |
| 3218 | }, |
| 3219 | { |
| 3220 | "input": "https:@/www.example.com", |
| 3221 | "base": null, |
| 3222 | "failure": true, |
| 3223 | "relativeTo": "non-opaque-path-base" |
| 3224 | }, |
| 3225 | { |
| 3226 | "input": "http:a:b@/www.example.com", |
| 3227 | "base": null, |
| 3228 | "failure": true, |
| 3229 | "relativeTo": "non-opaque-path-base" |
| 3230 | }, |
| 3231 | { |
| 3232 | "input": "http:/a:b@/www.example.com", |
| 3233 | "base": null, |
| 3234 | "failure": true, |
| 3235 | "relativeTo": "non-opaque-path-base" |
| 3236 | }, |
| 3237 | { |
| 3238 | "input": "http://a:b@/www.example.com", |
| 3239 | "base": null, |
| 3240 | "failure": true |
| 3241 | }, |
| 3242 | { |
| 3243 | "input": "http::@/www.example.com", |
| 3244 | "base": null, |
| 3245 | "failure": true, |
| 3246 | "relativeTo": "non-opaque-path-base" |
| 3247 | }, |
| 3248 | { |
| 3249 | "input": "http:a:@www.example.com", |
| 3250 | "base": null, |
| 3251 | "href": "http://[email protected]/", |
| 3252 | "origin": "http://www.example.com", |
| 3253 | "protocol": "http:", |
| 3254 | "username": "a", |
| 3255 | "password": "", |
| 3256 | "host": "www.example.com", |
| 3257 | "hostname": "www.example.com", |
| 3258 | "port": "", |
| 3259 | "pathname": "/", |
| 3260 | "search": "", |
| 3261 | "hash": "" |
| 3262 | }, |
| 3263 | { |
| 3264 | "input": "http:/a:@www.example.com", |
| 3265 | "base": null, |
| 3266 | "href": "http://[email protected]/", |
| 3267 | "origin": "http://www.example.com", |
| 3268 | "protocol": "http:", |
| 3269 | "username": "a", |
| 3270 | "password": "", |
| 3271 | "host": "www.example.com", |
| 3272 | "hostname": "www.example.com", |
| 3273 | "port": "", |
| 3274 | "pathname": "/", |
| 3275 | "search": "", |
| 3276 | "hash": "" |
| 3277 | }, |
| 3278 | { |
| 3279 | "input": "http://a:@www.example.com", |
| 3280 | "base": null, |
| 3281 | "href": "http://[email protected]/", |
| 3282 | "origin": "http://www.example.com", |
| 3283 | "protocol": "http:", |
| 3284 | "username": "a", |
| 3285 | "password": "", |
| 3286 | "host": "www.example.com", |
| 3287 | "hostname": "www.example.com", |
| 3288 | "port": "", |
| 3289 | "pathname": "/", |
| 3290 | "search": "", |
| 3291 | "hash": "" |
| 3292 | }, |
| 3293 | { |
| 3294 | "input": "http://[email protected]", |
| 3295 | "base": null, |
| 3296 | "href": "http://[email protected]/", |
| 3297 | "origin": "http://pple.com", |
| 3298 | "protocol": "http:", |
| 3299 | "username": "www.", |
| 3300 | "password": "", |
| 3301 | "host": "pple.com", |
| 3302 | "hostname": "pple.com", |
| 3303 | "port": "", |
| 3304 | "pathname": "/", |
| 3305 | "search": "", |
| 3306 | "hash": "" |
| 3307 | }, |
| 3308 | { |
| 3309 | "input": "http:@:www.example.com", |
| 3310 | "base": null, |
| 3311 | "failure": true, |
| 3312 | "relativeTo": "non-opaque-path-base" |
| 3313 | }, |
| 3314 | { |
| 3315 | "input": "http:/@:www.example.com", |
| 3316 | "base": null, |
| 3317 | "failure": true, |
| 3318 | "relativeTo": "non-opaque-path-base" |
| 3319 | }, |
| 3320 | { |
| 3321 | "input": "http://@:www.example.com", |
| 3322 | "base": null, |
| 3323 | "failure": true |
| 3324 | }, |
| 3325 | { |
| 3326 | "input": "http://:@www.example.com", |
| 3327 | "base": null, |
| 3328 | "href": "http://www.example.com/", |
| 3329 | "origin": "http://www.example.com", |
| 3330 | "protocol": "http:", |
| 3331 | "username": "", |
| 3332 | "password": "", |
| 3333 | "host": "www.example.com", |
| 3334 | "hostname": "www.example.com", |
| 3335 | "port": "", |
| 3336 | "pathname": "/", |
| 3337 | "search": "", |
| 3338 | "hash": "" |
| 3339 | }, |
| 3340 | "# Others", |
| 3341 | { |
| 3342 | "input": "/", |
| 3343 | "base": "http://www.example.com/test", |
| 3344 | "href": "http://www.example.com/", |
| 3345 | "origin": "http://www.example.com", |
| 3346 | "protocol": "http:", |
| 3347 | "username": "", |
| 3348 | "password": "", |
| 3349 | "host": "www.example.com", |
| 3350 | "hostname": "www.example.com", |
| 3351 | "port": "", |
| 3352 | "pathname": "/", |
| 3353 | "search": "", |
| 3354 | "hash": "" |
| 3355 | }, |
| 3356 | { |
| 3357 | "input": "/test.txt", |
| 3358 | "base": "http://www.example.com/test", |
| 3359 | "href": "http://www.example.com/test.txt", |
| 3360 | "origin": "http://www.example.com", |
| 3361 | "protocol": "http:", |
| 3362 | "username": "", |
| 3363 | "password": "", |
| 3364 | "host": "www.example.com", |
| 3365 | "hostname": "www.example.com", |
| 3366 | "port": "", |
| 3367 | "pathname": "/test.txt", |
| 3368 | "search": "", |
| 3369 | "hash": "" |
| 3370 | }, |
| 3371 | { |
| 3372 | "input": ".", |
| 3373 | "base": "http://www.example.com/test", |
| 3374 | "href": "http://www.example.com/", |
| 3375 | "origin": "http://www.example.com", |
| 3376 | "protocol": "http:", |
| 3377 | "username": "", |
| 3378 | "password": "", |
| 3379 | "host": "www.example.com", |
| 3380 | "hostname": "www.example.com", |
| 3381 | "port": "", |
| 3382 | "pathname": "/", |
| 3383 | "search": "", |
| 3384 | "hash": "" |
| 3385 | }, |
| 3386 | { |
| 3387 | "input": "..", |
| 3388 | "base": "http://www.example.com/test", |
| 3389 | "href": "http://www.example.com/", |
| 3390 | "origin": "http://www.example.com", |
| 3391 | "protocol": "http:", |
| 3392 | "username": "", |
| 3393 | "password": "", |
| 3394 | "host": "www.example.com", |
| 3395 | "hostname": "www.example.com", |
| 3396 | "port": "", |
| 3397 | "pathname": "/", |
| 3398 | "search": "", |
| 3399 | "hash": "" |
| 3400 | }, |
| 3401 | { |
| 3402 | "input": "test.txt", |
| 3403 | "base": "http://www.example.com/test", |
| 3404 | "href": "http://www.example.com/test.txt", |
| 3405 | "origin": "http://www.example.com", |
| 3406 | "protocol": "http:", |
| 3407 | "username": "", |
| 3408 | "password": "", |
| 3409 | "host": "www.example.com", |
| 3410 | "hostname": "www.example.com", |
| 3411 | "port": "", |
| 3412 | "pathname": "/test.txt", |
| 3413 | "search": "", |
| 3414 | "hash": "" |
| 3415 | }, |
| 3416 | { |
| 3417 | "input": "./test.txt", |
| 3418 | "base": "http://www.example.com/test", |
| 3419 | "href": "http://www.example.com/test.txt", |
| 3420 | "origin": "http://www.example.com", |
| 3421 | "protocol": "http:", |
| 3422 | "username": "", |
| 3423 | "password": "", |
| 3424 | "host": "www.example.com", |
| 3425 | "hostname": "www.example.com", |
| 3426 | "port": "", |
| 3427 | "pathname": "/test.txt", |
| 3428 | "search": "", |
| 3429 | "hash": "" |
| 3430 | }, |
| 3431 | { |
| 3432 | "input": "../test.txt", |
| 3433 | "base": "http://www.example.com/test", |
| 3434 | "href": "http://www.example.com/test.txt", |
| 3435 | "origin": "http://www.example.com", |
| 3436 | "protocol": "http:", |
| 3437 | "username": "", |
| 3438 | "password": "", |
| 3439 | "host": "www.example.com", |
| 3440 | "hostname": "www.example.com", |
| 3441 | "port": "", |
| 3442 | "pathname": "/test.txt", |
| 3443 | "search": "", |
| 3444 | "hash": "" |
| 3445 | }, |
| 3446 | { |
| 3447 | "input": "../aaa/test.txt", |
| 3448 | "base": "http://www.example.com/test", |
| 3449 | "href": "http://www.example.com/aaa/test.txt", |
| 3450 | "origin": "http://www.example.com", |
| 3451 | "protocol": "http:", |
| 3452 | "username": "", |
| 3453 | "password": "", |
| 3454 | "host": "www.example.com", |
| 3455 | "hostname": "www.example.com", |
| 3456 | "port": "", |
| 3457 | "pathname": "/aaa/test.txt", |
| 3458 | "search": "", |
| 3459 | "hash": "" |
| 3460 | }, |
| 3461 | { |
| 3462 | "input": "../../test.txt", |
| 3463 | "base": "http://www.example.com/test", |
| 3464 | "href": "http://www.example.com/test.txt", |
| 3465 | "origin": "http://www.example.com", |
| 3466 | "protocol": "http:", |
| 3467 | "username": "", |
| 3468 | "password": "", |
| 3469 | "host": "www.example.com", |
| 3470 | "hostname": "www.example.com", |
| 3471 | "port": "", |
| 3472 | "pathname": "/test.txt", |
| 3473 | "search": "", |
| 3474 | "hash": "" |
| 3475 | }, |
| 3476 | { |
| 3477 | "input": "中/test.txt", |
| 3478 | "base": "http://www.example.com/test", |
| 3479 | "href": "http://www.example.com/%E4%B8%AD/test.txt", |
| 3480 | "origin": "http://www.example.com", |
| 3481 | "protocol": "http:", |
| 3482 | "username": "", |
| 3483 | "password": "", |
| 3484 | "host": "www.example.com", |
| 3485 | "hostname": "www.example.com", |
| 3486 | "port": "", |
| 3487 | "pathname": "/%E4%B8%AD/test.txt", |
| 3488 | "search": "", |
| 3489 | "hash": "" |
| 3490 | }, |
| 3491 | { |
| 3492 | "input": "http://www.example2.com", |
| 3493 | "base": "http://www.example.com/test", |
| 3494 | "href": "http://www.example2.com/", |
| 3495 | "origin": "http://www.example2.com", |
| 3496 | "protocol": "http:", |
| 3497 | "username": "", |
| 3498 | "password": "", |
| 3499 | "host": "www.example2.com", |
| 3500 | "hostname": "www.example2.com", |
| 3501 | "port": "", |
| 3502 | "pathname": "/", |
| 3503 | "search": "", |
| 3504 | "hash": "" |
| 3505 | }, |
| 3506 | { |
| 3507 | "input": "//www.example2.com", |
| 3508 | "base": "http://www.example.com/test", |
| 3509 | "href": "http://www.example2.com/", |
| 3510 | "origin": "http://www.example2.com", |
| 3511 | "protocol": "http:", |
| 3512 | "username": "", |
| 3513 | "password": "", |
| 3514 | "host": "www.example2.com", |
| 3515 | "hostname": "www.example2.com", |
| 3516 | "port": "", |
| 3517 | "pathname": "/", |
| 3518 | "search": "", |
| 3519 | "hash": "" |
| 3520 | }, |
| 3521 | { |
| 3522 | "input": "file:...", |
| 3523 | "base": "http://www.example.com/test", |
| 3524 | "href": "file:///...", |
| 3525 | "protocol": "file:", |
| 3526 | "username": "", |
| 3527 | "password": "", |
| 3528 | "host": "", |
| 3529 | "hostname": "", |
| 3530 | "port": "", |
| 3531 | "pathname": "/...", |
| 3532 | "search": "", |
| 3533 | "hash": "" |
| 3534 | }, |
| 3535 | { |
| 3536 | "input": "file:..", |
| 3537 | "base": "http://www.example.com/test", |
| 3538 | "href": "file:///", |
| 3539 | "protocol": "file:", |
| 3540 | "username": "", |
| 3541 | "password": "", |
| 3542 | "host": "", |
| 3543 | "hostname": "", |
| 3544 | "port": "", |
| 3545 | "pathname": "/", |
| 3546 | "search": "", |
| 3547 | "hash": "" |
| 3548 | }, |
| 3549 | { |
| 3550 | "input": "file:a", |
| 3551 | "base": "http://www.example.com/test", |
| 3552 | "href": "file:///a", |
| 3553 | "protocol": "file:", |
| 3554 | "username": "", |
| 3555 | "password": "", |
| 3556 | "host": "", |
| 3557 | "hostname": "", |
| 3558 | "port": "", |
| 3559 | "pathname": "/a", |
| 3560 | "search": "", |
| 3561 | "hash": "" |
| 3562 | }, |
| 3563 | "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html", |
| 3564 | "Basic canonicalization, uppercase should be converted to lowercase", |
| 3565 | { |
| 3566 | "input": "http://ExAmPlE.CoM", |
| 3567 | "base": "http://other.com/", |
| 3568 | "href": "http://example.com/", |
| 3569 | "origin": "http://example.com", |
| 3570 | "protocol": "http:", |
| 3571 | "username": "", |
| 3572 | "password": "", |
| 3573 | "host": "example.com", |
| 3574 | "hostname": "example.com", |
| 3575 | "port": "", |
| 3576 | "pathname": "/", |
| 3577 | "search": "", |
| 3578 | "hash": "" |
| 3579 | }, |
| 3580 | { |
| 3581 | "input": "http://example example.com", |
| 3582 | "base": "http://other.com/", |
| 3583 | "failure": true |
| 3584 | }, |
| 3585 | { |
| 3586 | "input": "http://Goo%20 goo%7C|.com", |
| 3587 | "base": "http://other.com/", |
| 3588 | "failure": true |
| 3589 | }, |
| 3590 | { |
| 3591 | "input": "http://[]", |
| 3592 | "base": "http://other.com/", |
| 3593 | "failure": true |
| 3594 | }, |
| 3595 | { |
| 3596 | "input": "http://[:]", |
| 3597 | "base": "http://other.com/", |
| 3598 | "failure": true |
| 3599 | }, |
| 3600 | "U+3000 is mapped to U+0020 (space) which is disallowed", |
| 3601 | { |
| 3602 | "input": "http://GOO\u00a0\u3000goo.com", |
| 3603 | "base": "http://other.com/", |
| 3604 | "failure": true |
| 3605 | }, |
| 3606 | "Other types of space (no-break, zero-width, zero-width-no-break) are name-prepped away to nothing. U+200B, U+2060, and U+FEFF, are ignored", |
| 3607 | { |
| 3608 | "input": "http://GOO\u200b\u2060\ufeffgoo.com", |
| 3609 | "base": "http://other.com/", |
| 3610 | "href": "http://googoo.com/", |
| 3611 | "origin": "http://googoo.com", |
| 3612 | "protocol": "http:", |
| 3613 | "username": "", |
| 3614 | "password": "", |
| 3615 | "host": "googoo.com", |
| 3616 | "hostname": "googoo.com", |
| 3617 | "port": "", |
| 3618 | "pathname": "/", |
| 3619 | "search": "", |
| 3620 | "hash": "" |
| 3621 | }, |
| 3622 | "Leading and trailing C0 control or space", |
| 3623 | { |
| 3624 | "input": "\u0000\u001b\u0004\u0012 http://example.com/\u001f \u000d ", |
| 3625 | "base": null, |
| 3626 | "href": "http://example.com/", |
| 3627 | "origin": "http://example.com", |
| 3628 | "protocol": "http:", |
| 3629 | "username": "", |
| 3630 | "password": "", |
| 3631 | "host": "example.com", |
| 3632 | "hostname": "example.com", |
| 3633 | "port": "", |
| 3634 | "pathname": "/", |
| 3635 | "search": "", |
| 3636 | "hash": "" |
| 3637 | }, |
| 3638 | "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)", |
| 3639 | { |
| 3640 | "input": "http://www.foo。bar.com", |
| 3641 | "base": "http://other.com/", |
| 3642 | "href": "http://www.foo.bar.com/", |
| 3643 | "origin": "http://www.foo.bar.com", |
| 3644 | "protocol": "http:", |
| 3645 | "username": "", |
| 3646 | "password": "", |
| 3647 | "host": "www.foo.bar.com", |
| 3648 | "hostname": "www.foo.bar.com", |
| 3649 | "port": "", |
| 3650 | "pathname": "/", |
| 3651 | "search": "", |
| 3652 | "hash": "" |
| 3653 | }, |
| 3654 | "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0", |
| 3655 | { |
| 3656 | "input": "http://\ufdd0zyx.com", |
| 3657 | "base": "http://other.com/", |
| 3658 | "failure": true |
| 3659 | }, |
| 3660 | "This is the same as previous but escaped", |
| 3661 | { |
| 3662 | "input": "http://%ef%b7%90zyx.com", |
| 3663 | "base": "http://other.com/", |
| 3664 | "failure": true |
| 3665 | }, |
| 3666 | "U+FFFD", |
| 3667 | { |
| 3668 | "input": "https://\ufffd", |
| 3669 | "base": null, |
| 3670 | "failure": true |
| 3671 | }, |
| 3672 | { |
| 3673 | "input": "https://%EF%BF%BD", |
| 3674 | "base": null, |
| 3675 | "failure": true |
| 3676 | }, |
| 3677 | { |
| 3678 | "input": "https://x/\ufffd?\ufffd#\ufffd", |
| 3679 | "base": null, |
| 3680 | "href": "https://x/%EF%BF%BD?%EF%BF%BD#%EF%BF%BD", |
| 3681 | "origin": "https://x", |
| 3682 | "protocol": "https:", |
| 3683 | "username": "", |
| 3684 | "password": "", |
| 3685 | "host": "x", |
| 3686 | "hostname": "x", |
| 3687 | "port": "", |
| 3688 | "pathname": "/%EF%BF%BD", |
| 3689 | "search": "?%EF%BF%BD", |
| 3690 | "hash": "#%EF%BF%BD" |
| 3691 | }, |
| 3692 | "Domain is ASCII, but a label is invalid IDNA", |
| 3693 | { |
| 3694 | "input": "http://a.b.c.xn--pokxncvks", |
| 3695 | "base": null, |
| 3696 | "failure": true |
| 3697 | }, |
| 3698 | { |
| 3699 | "input": "http://10.0.0.xn--pokxncvks", |
| 3700 | "base": null, |
| 3701 | "failure": true |
| 3702 | }, |
| 3703 | "IDNA labels should be matched case-insensitively", |
| 3704 | { |
| 3705 | "input": "http://a.b.c.XN--pokxncvks", |
| 3706 | "base": null, |
| 3707 | "failure": true |
| 3708 | }, |
| 3709 | { |
| 3710 | "input": "http://a.b.c.Xn--pokxncvks", |
| 3711 | "base": null, |
| 3712 | "failure": true |
| 3713 | }, |
| 3714 | { |
| 3715 | "input": "http://10.0.0.XN--pokxncvks", |
| 3716 | "base": null, |
| 3717 | "failure": true |
| 3718 | }, |
| 3719 | { |
| 3720 | "input": "http://10.0.0.xN--pokxncvks", |
| 3721 | "base": null, |
| 3722 | "failure": true |
| 3723 | }, |
| 3724 | "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.", |
| 3725 | { |
| 3726 | "input": "http://Go.com", |
| 3727 | "base": "http://other.com/", |
| 3728 | "href": "http://go.com/", |
| 3729 | "origin": "http://go.com", |
| 3730 | "protocol": "http:", |
| 3731 | "username": "", |
| 3732 | "password": "", |
| 3733 | "host": "go.com", |
| 3734 | "hostname": "go.com", |
| 3735 | "port": "", |
| 3736 | "pathname": "/", |
| 3737 | "search": "", |
| 3738 | "hash": "" |
| 3739 | }, |
| 3740 | "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257", |
| 3741 | { |
| 3742 | "input": "http://%41.com", |
| 3743 | "base": "http://other.com/", |
| 3744 | "failure": true |
| 3745 | }, |
| 3746 | { |
| 3747 | "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com", |
| 3748 | "base": "http://other.com/", |
| 3749 | "failure": true |
| 3750 | }, |
| 3751 | "...%00 in fullwidth should fail (also as escaped UTF-8 input)", |
| 3752 | { |
| 3753 | "input": "http://%00.com", |
| 3754 | "base": "http://other.com/", |
| 3755 | "failure": true |
| 3756 | }, |
| 3757 | { |
| 3758 | "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com", |
| 3759 | "base": "http://other.com/", |
| 3760 | "failure": true |
| 3761 | }, |
| 3762 | "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN", |
| 3763 | { |
| 3764 | "input": "http://你好你好", |
| 3765 | "base": "http://other.com/", |
| 3766 | "href": "http://xn--6qqa088eba/", |
| 3767 | "origin": "http://xn--6qqa088eba", |
| 3768 | "protocol": "http:", |
| 3769 | "username": "", |
| 3770 | "password": "", |
| 3771 | "host": "xn--6qqa088eba", |
| 3772 | "hostname": "xn--6qqa088eba", |
| 3773 | "port": "", |
| 3774 | "pathname": "/", |
| 3775 | "search": "", |
| 3776 | "hash": "" |
| 3777 | }, |
| 3778 | { |
| 3779 | "input": "https://faß.ExAmPlE/", |
| 3780 | "base": null, |
| 3781 | "href": "https://xn--fa-hia.example/", |
| 3782 | "origin": "https://xn--fa-hia.example", |
| 3783 | "protocol": "https:", |
| 3784 | "username": "", |
| 3785 | "password": "", |
| 3786 | "host": "xn--fa-hia.example", |
| 3787 | "hostname": "xn--fa-hia.example", |
| 3788 | "port": "", |
| 3789 | "pathname": "/", |
| 3790 | "search": "", |
| 3791 | "hash": "" |
| 3792 | }, |
| 3793 | { |
| 3794 | "input": "sc://faß.ExAmPlE/", |
| 3795 | "base": null, |
| 3796 | "href": "sc://fa%C3%9F.ExAmPlE/", |
| 3797 | "origin": "null", |
| 3798 | "protocol": "sc:", |
| 3799 | "username": "", |
| 3800 | "password": "", |
| 3801 | "host": "fa%C3%9F.ExAmPlE", |
| 3802 | "hostname": "fa%C3%9F.ExAmPlE", |
| 3803 | "port": "", |
| 3804 | "pathname": "/", |
| 3805 | "search": "", |
| 3806 | "hash": "" |
| 3807 | }, |
| 3808 | "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191", |
| 3809 | { |
| 3810 | "input": "http://%zz%66%a.com", |
| 3811 | "base": "http://other.com/", |
| 3812 | "failure": true |
| 3813 | }, |
| 3814 | "If we get an invalid character that has been escaped.", |
| 3815 | { |
| 3816 | "input": "http://%25", |
| 3817 | "base": "http://other.com/", |
| 3818 | "failure": true |
| 3819 | }, |
| 3820 | { |
| 3821 | "input": "http://hello%00", |
| 3822 | "base": "http://other.com/", |
| 3823 | "failure": true |
| 3824 | }, |
| 3825 | "Escaped numbers should be treated like IP addresses if they are.", |
| 3826 | { |
| 3827 | "input": "http://%30%78%63%30%2e%30%32%35%30.01", |
| 3828 | "base": "http://other.com/", |
| 3829 | "href": "http://192.168.0.1/", |
| 3830 | "origin": "http://192.168.0.1", |
| 3831 | "protocol": "http:", |
| 3832 | "username": "", |
| 3833 | "password": "", |
| 3834 | "host": "192.168.0.1", |
| 3835 | "hostname": "192.168.0.1", |
| 3836 | "port": "", |
| 3837 | "pathname": "/", |
| 3838 | "search": "", |
| 3839 | "hash": "" |
| 3840 | }, |
| 3841 | { |
| 3842 | "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e", |
| 3843 | "base": "http://other.com/", |
| 3844 | "href": "http://192.168.0.1/", |
| 3845 | "origin": "http://192.168.0.1", |
| 3846 | "protocol": "http:", |
| 3847 | "username": "", |
| 3848 | "password": "", |
| 3849 | "host": "192.168.0.1", |
| 3850 | "hostname": "192.168.0.1", |
| 3851 | "port": "", |
| 3852 | "pathname": "/", |
| 3853 | "search": "", |
| 3854 | "hash": "" |
| 3855 | }, |
| 3856 | { |
| 3857 | "input": "http://192.168.0.257", |
| 3858 | "base": "http://other.com/", |
| 3859 | "failure": true |
| 3860 | }, |
| 3861 | "Invalid escaping in hosts causes failure", |
| 3862 | { |
| 3863 | "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01", |
| 3864 | "base": "http://other.com/", |
| 3865 | "failure": true |
| 3866 | }, |
| 3867 | "A space in a host causes failure", |
| 3868 | { |
| 3869 | "input": "http://192.168.0.1 hello", |
| 3870 | "base": "http://other.com/", |
| 3871 | "failure": true |
| 3872 | }, |
| 3873 | { |
| 3874 | "input": "https://x x:12", |
| 3875 | "base": null, |
| 3876 | "failure": true |
| 3877 | }, |
| 3878 | "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP", |
| 3879 | { |
| 3880 | "input": "http://0Xc0.0250.01", |
| 3881 | "base": "http://other.com/", |
| 3882 | "href": "http://192.168.0.1/", |
| 3883 | "origin": "http://192.168.0.1", |
| 3884 | "protocol": "http:", |
| 3885 | "username": "", |
| 3886 | "password": "", |
| 3887 | "host": "192.168.0.1", |
| 3888 | "hostname": "192.168.0.1", |
| 3889 | "port": "", |
| 3890 | "pathname": "/", |
| 3891 | "search": "", |
| 3892 | "hash": "" |
| 3893 | }, |
| 3894 | "Domains with empty labels", |
| 3895 | { |
| 3896 | "input": "http://./", |
| 3897 | "base": null, |
| 3898 | "href": "http://./", |
| 3899 | "origin": "http://.", |
| 3900 | "protocol": "http:", |
| 3901 | "username": "", |
| 3902 | "password": "", |
| 3903 | "host": ".", |
| 3904 | "hostname": ".", |
| 3905 | "port": "", |
| 3906 | "pathname": "/", |
| 3907 | "search": "", |
| 3908 | "hash": "" |
| 3909 | }, |
| 3910 | { |
| 3911 | "input": "http://../", |
| 3912 | "base": null, |
| 3913 | "href": "http://../", |
| 3914 | "origin": "http://..", |
| 3915 | "protocol": "http:", |
| 3916 | "username": "", |
| 3917 | "password": "", |
| 3918 | "host": "..", |
| 3919 | "hostname": "..", |
| 3920 | "port": "", |
| 3921 | "pathname": "/", |
| 3922 | "search": "", |
| 3923 | "hash": "" |
| 3924 | }, |
| 3925 | "Non-special domains with empty labels", |
| 3926 | { |
| 3927 | "input": "h://.", |
| 3928 | "base": null, |
| 3929 | "href": "h://.", |
| 3930 | "origin": "null", |
| 3931 | "protocol": "h:", |
| 3932 | "username": "", |
| 3933 | "password": "", |
| 3934 | "host": ".", |
| 3935 | "hostname": ".", |
| 3936 | "port": "", |
| 3937 | "pathname": "", |
| 3938 | "search": "", |
| 3939 | "hash": "" |
| 3940 | }, |
| 3941 | "Broken IPv6", |
| 3942 | { |
| 3943 | "input": "http://[www.google.com]/", |
| 3944 | "base": null, |
| 3945 | "failure": true |
| 3946 | }, |
| 3947 | { |
| 3948 | "input": "http://[google.com]", |
| 3949 | "base": "http://other.com/", |
| 3950 | "failure": true |
| 3951 | }, |
| 3952 | { |
| 3953 | "input": "http://[::1.2.3.4x]", |
| 3954 | "base": "http://other.com/", |
| 3955 | "failure": true |
| 3956 | }, |
| 3957 | { |
| 3958 | "input": "http://[::1.2.3.]", |
| 3959 | "base": "http://other.com/", |
| 3960 | "failure": true |
| 3961 | }, |
| 3962 | { |
| 3963 | "input": "http://[::1.2.]", |
| 3964 | "base": "http://other.com/", |
| 3965 | "failure": true |
| 3966 | }, |
| 3967 | { |
| 3968 | "input": "http://[::.1.2]", |
| 3969 | "base": "http://other.com/", |
| 3970 | "failure": true |
| 3971 | }, |
| 3972 | { |
| 3973 | "input": "http://[::1.]", |
| 3974 | "base": "http://other.com/", |
| 3975 | "failure": true |
| 3976 | }, |
| 3977 | { |
| 3978 | "input": "http://[::.1]", |
| 3979 | "base": "http://other.com/", |
| 3980 | "failure": true |
| 3981 | }, |
| 3982 | { |
| 3983 | "input": "http://[::%31]", |
| 3984 | "base": "http://other.com/", |
| 3985 | "failure": true |
| 3986 | }, |
| 3987 | { |
| 3988 | "input": "http://%5B::1]", |
| 3989 | "base": "http://other.com/", |
| 3990 | "failure": true |
| 3991 | }, |
| 3992 | "Misc Unicode", |
| 3993 | { |
| 3994 | "input": "http://foo:💩@example.com/bar", |
| 3995 | "base": "http://other.com/", |
| 3996 | "href": "http://foo:%F0%9F%92%[email protected]/bar", |
| 3997 | "origin": "http://example.com", |
| 3998 | "protocol": "http:", |
| 3999 | "username": "foo", |
| 4000 | "password": "%F0%9F%92%A9", |
| 4001 | "host": "example.com", |
| 4002 | "hostname": "example.com", |
| 4003 | "port": "", |
| 4004 | "pathname": "/bar", |
| 4005 | "search": "", |
| 4006 | "hash": "" |
| 4007 | }, |
| 4008 | "# resolving a fragment against any scheme succeeds", |
| 4009 | { |
| 4010 | "input": "#", |
| 4011 | "base": "test:test", |
| 4012 | "href": "test:test#", |
| 4013 | "origin": "null", |
| 4014 | "protocol": "test:", |
| 4015 | "username": "", |
| 4016 | "password": "", |
| 4017 | "host": "", |
| 4018 | "hostname": "", |
| 4019 | "port": "", |
| 4020 | "pathname": "test", |
| 4021 | "search": "", |
| 4022 | "hash": "" |
| 4023 | }, |
| 4024 | { |
| 4025 | "input": "#x", |
| 4026 | "base": "mailto:[email protected]", |
| 4027 | "href": "mailto:[email protected]#x", |
| 4028 | "origin": "null", |
| 4029 | "protocol": "mailto:", |
| 4030 | "username": "", |
| 4031 | "password": "", |
| 4032 | "host": "", |
| 4033 | "hostname": "", |
| 4034 | "port": "", |
| 4035 | "pathname": "[email protected]", |
| 4036 | "search": "", |
| 4037 | "hash": "#x" |
| 4038 | }, |
| 4039 | { |
| 4040 | "input": "#x", |
| 4041 | "base": "data:,", |
| 4042 | "href": "data:,#x", |
| 4043 | "origin": "null", |
| 4044 | "protocol": "data:", |
| 4045 | "username": "", |
| 4046 | "password": "", |
| 4047 | "host": "", |
| 4048 | "hostname": "", |
| 4049 | "port": "", |
| 4050 | "pathname": ",", |
| 4051 | "search": "", |
| 4052 | "hash": "#x" |
| 4053 | }, |
| 4054 | { |
| 4055 | "input": "#x", |
| 4056 | "base": "about:blank", |
| 4057 | "href": "about:blank#x", |
| 4058 | "origin": "null", |
| 4059 | "protocol": "about:", |
| 4060 | "username": "", |
| 4061 | "password": "", |
| 4062 | "host": "", |
| 4063 | "hostname": "", |
| 4064 | "port": "", |
| 4065 | "pathname": "blank", |
| 4066 | "search": "", |
| 4067 | "hash": "#x" |
| 4068 | }, |
| 4069 | { |
| 4070 | "input": "#x:y", |
| 4071 | "base": "about:blank", |
| 4072 | "href": "about:blank#x:y", |
| 4073 | "origin": "null", |
| 4074 | "protocol": "about:", |
| 4075 | "username": "", |
| 4076 | "password": "", |
| 4077 | "host": "", |
| 4078 | "hostname": "", |
| 4079 | "port": "", |
| 4080 | "pathname": "blank", |
| 4081 | "search": "", |
| 4082 | "hash": "#x:y" |
| 4083 | }, |
| 4084 | { |
| 4085 | "input": "#", |
| 4086 | "base": "test:test?test", |
| 4087 | "href": "test:test?test#", |
| 4088 | "origin": "null", |
| 4089 | "protocol": "test:", |
| 4090 | "username": "", |
| 4091 | "password": "", |
| 4092 | "host": "", |
| 4093 | "hostname": "", |
| 4094 | "port": "", |
| 4095 | "pathname": "test", |
| 4096 | "search": "?test", |
| 4097 | "hash": "" |
| 4098 | }, |
| 4099 | "# multiple @ in authority state", |
| 4100 | { |
| 4101 | "input": "https://@test@test@example:800/", |
| 4102 | "base": "http://doesnotmatter/", |
| 4103 | "href": "https://%40test%40test@example:800/", |
| 4104 | "origin": "https://example:800", |
| 4105 | "protocol": "https:", |
| 4106 | "username": "%40test%40test", |
| 4107 | "password": "", |
| 4108 | "host": "example:800", |
| 4109 | "hostname": "example", |
| 4110 | "port": "800", |
| 4111 | "pathname": "/", |
| 4112 | "search": "", |
| 4113 | "hash": "" |
| 4114 | }, |
| 4115 | { |
| 4116 | "input": "https://@@@example", |
| 4117 | "base": "http://doesnotmatter/", |
| 4118 | "href": "https://%40%40@example/", |
| 4119 | "origin": "https://example", |
| 4120 | "protocol": "https:", |
| 4121 | "username": "%40%40", |
| 4122 | "password": "", |
| 4123 | "host": "example", |
| 4124 | "hostname": "example", |
| 4125 | "port": "", |
| 4126 | "pathname": "/", |
| 4127 | "search": "", |
| 4128 | "hash": "" |
| 4129 | }, |
| 4130 | "non-az-09 characters", |
| 4131 | { |
| 4132 | "input": "http://`{}:`{}@h/`{}?`{}", |
| 4133 | "base": "http://doesnotmatter/", |
| 4134 | "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}", |
| 4135 | "origin": "http://h", |
| 4136 | "protocol": "http:", |
| 4137 | "username": "%60%7B%7D", |
| 4138 | "password": "%60%7B%7D", |
| 4139 | "host": "h", |
| 4140 | "hostname": "h", |
| 4141 | "port": "", |
| 4142 | "pathname": "/%60%7B%7D", |
| 4143 | "search": "?`{}", |
| 4144 | "hash": "" |
| 4145 | }, |
| 4146 | "byte is ' and url is special", |
| 4147 | { |
| 4148 | "input": "http://host/?'", |
| 4149 | "base": null, |
| 4150 | "href": "http://host/?%27", |
| 4151 | "origin": "http://host", |
| 4152 | "protocol": "http:", |
| 4153 | "username": "", |
| 4154 | "password": "", |
| 4155 | "host": "host", |
| 4156 | "hostname": "host", |
| 4157 | "port": "", |
| 4158 | "pathname": "/", |
| 4159 | "search": "?%27", |
| 4160 | "hash": "" |
| 4161 | }, |
| 4162 | { |
| 4163 | "input": "notspecial://host/?'", |
| 4164 | "base": null, |
| 4165 | "href": "notspecial://host/?'", |
| 4166 | "origin": "null", |
| 4167 | "protocol": "notspecial:", |
| 4168 | "username": "", |
| 4169 | "password": "", |
| 4170 | "host": "host", |
| 4171 | "hostname": "host", |
| 4172 | "port": "", |
| 4173 | "pathname": "/", |
| 4174 | "search": "?'", |
| 4175 | "hash": "" |
| 4176 | }, |
| 4177 | "# Credentials in base", |
| 4178 | { |
| 4179 | "input": "/some/path", |
| 4180 | "base": "http://[email protected]/smth", |
| 4181 | "href": "http://[email protected]/some/path", |
| 4182 | "origin": "http://example.org", |
| 4183 | "protocol": "http:", |
| 4184 | "username": "user", |
| 4185 | "password": "", |
| 4186 | "host": "example.org", |
| 4187 | "hostname": "example.org", |
| 4188 | "port": "", |
| 4189 | "pathname": "/some/path", |
| 4190 | "search": "", |
| 4191 | "hash": "" |
| 4192 | }, |
| 4193 | { |
| 4194 | "input": "", |
| 4195 | "base": "http://user:[email protected]:21/smth", |
| 4196 | "href": "http://user:[email protected]:21/smth", |
| 4197 | "origin": "http://example.org:21", |
| 4198 | "protocol": "http:", |
| 4199 | "username": "user", |
| 4200 | "password": "pass", |
| 4201 | "host": "example.org:21", |
| 4202 | "hostname": "example.org", |
| 4203 | "port": "21", |
| 4204 | "pathname": "/smth", |
| 4205 | "search": "", |
| 4206 | "hash": "" |
| 4207 | }, |
| 4208 | { |
| 4209 | "input": "/some/path", |
| 4210 | "base": "http://user:[email protected]:21/smth", |
| 4211 | "href": "http://user:[email protected]:21/some/path", |
| 4212 | "origin": "http://example.org:21", |
| 4213 | "protocol": "http:", |
| 4214 | "username": "user", |
| 4215 | "password": "pass", |
| 4216 | "host": "example.org:21", |
| 4217 | "hostname": "example.org", |
| 4218 | "port": "21", |
| 4219 | "pathname": "/some/path", |
| 4220 | "search": "", |
| 4221 | "hash": "" |
| 4222 | }, |
| 4223 | "# a set of tests designed by zcorpan for relative URLs with unknown schemes", |
| 4224 | { |
| 4225 | "input": "i", |
| 4226 | "base": "sc:sd", |
| 4227 | "failure": true |
| 4228 | }, |
| 4229 | { |
| 4230 | "input": "i", |
| 4231 | "base": "sc:sd/sd", |
| 4232 | "failure": true |
| 4233 | }, |
| 4234 | { |
| 4235 | "input": "i", |
| 4236 | "base": "sc:/pa/pa", |
| 4237 | "href": "sc:/pa/i", |
| 4238 | "origin": "null", |
| 4239 | "protocol": "sc:", |
| 4240 | "username": "", |
| 4241 | "password": "", |
| 4242 | "host": "", |
| 4243 | "hostname": "", |
| 4244 | "port": "", |
| 4245 | "pathname": "/pa/i", |
| 4246 | "search": "", |
| 4247 | "hash": "" |
| 4248 | }, |
| 4249 | { |
| 4250 | "input": "i", |
| 4251 | "base": "sc://ho/pa", |
| 4252 | "href": "sc://ho/i", |
| 4253 | "origin": "null", |
| 4254 | "protocol": "sc:", |
| 4255 | "username": "", |
| 4256 | "password": "", |
| 4257 | "host": "ho", |
| 4258 | "hostname": "ho", |
| 4259 | "port": "", |
| 4260 | "pathname": "/i", |
| 4261 | "search": "", |
| 4262 | "hash": "" |
| 4263 | }, |
| 4264 | { |
| 4265 | "input": "i", |
| 4266 | "base": "sc:///pa/pa", |
| 4267 | "href": "sc:///pa/i", |
| 4268 | "origin": "null", |
| 4269 | "protocol": "sc:", |
| 4270 | "username": "", |
| 4271 | "password": "", |
| 4272 | "host": "", |
| 4273 | "hostname": "", |
| 4274 | "port": "", |
| 4275 | "pathname": "/pa/i", |
| 4276 | "search": "", |
| 4277 | "hash": "" |
| 4278 | }, |
| 4279 | { |
| 4280 | "input": "../i", |
| 4281 | "base": "sc:sd", |
| 4282 | "failure": true |
| 4283 | }, |
| 4284 | { |
| 4285 | "input": "../i", |
| 4286 | "base": "sc:sd/sd", |
| 4287 | "failure": true |
| 4288 | }, |
| 4289 | { |
| 4290 | "input": "../i", |
| 4291 | "base": "sc:/pa/pa", |
| 4292 | "href": "sc:/i", |
| 4293 | "origin": "null", |
| 4294 | "protocol": "sc:", |
| 4295 | "username": "", |
| 4296 | "password": "", |
| 4297 | "host": "", |
| 4298 | "hostname": "", |
| 4299 | "port": "", |
| 4300 | "pathname": "/i", |
| 4301 | "search": "", |
| 4302 | "hash": "" |
| 4303 | }, |
| 4304 | { |
| 4305 | "input": "../i", |
| 4306 | "base": "sc://ho/pa", |
| 4307 | "href": "sc://ho/i", |
| 4308 | "origin": "null", |
| 4309 | "protocol": "sc:", |
| 4310 | "username": "", |
| 4311 | "password": "", |
| 4312 | "host": "ho", |
| 4313 | "hostname": "ho", |
| 4314 | "port": "", |
| 4315 | "pathname": "/i", |
| 4316 | "search": "", |
| 4317 | "hash": "" |
| 4318 | }, |
| 4319 | { |
| 4320 | "input": "../i", |
| 4321 | "base": "sc:///pa/pa", |
| 4322 | "href": "sc:///i", |
| 4323 | "origin": "null", |
| 4324 | "protocol": "sc:", |
| 4325 | "username": "", |
| 4326 | "password": "", |
| 4327 | "host": "", |
| 4328 | "hostname": "", |
| 4329 | "port": "", |
| 4330 | "pathname": "/i", |
| 4331 | "search": "", |
| 4332 | "hash": "" |
| 4333 | }, |
| 4334 | { |
| 4335 | "input": "/i", |
| 4336 | "base": "sc:sd", |
| 4337 | "failure": true |
| 4338 | }, |
| 4339 | { |
| 4340 | "input": "/i", |
| 4341 | "base": "sc:sd/sd", |
| 4342 | "failure": true |
| 4343 | }, |
| 4344 | { |
| 4345 | "input": "/i", |
| 4346 | "base": "sc:/pa/pa", |
| 4347 | "href": "sc:/i", |
| 4348 | "origin": "null", |
| 4349 | "protocol": "sc:", |
| 4350 | "username": "", |
| 4351 | "password": "", |
| 4352 | "host": "", |
| 4353 | "hostname": "", |
| 4354 | "port": "", |
| 4355 | "pathname": "/i", |
| 4356 | "search": "", |
| 4357 | "hash": "" |
| 4358 | }, |
| 4359 | { |
| 4360 | "input": "/i", |
| 4361 | "base": "sc://ho/pa", |
| 4362 | "href": "sc://ho/i", |
| 4363 | "origin": "null", |
| 4364 | "protocol": "sc:", |
| 4365 | "username": "", |
| 4366 | "password": "", |
| 4367 | "host": "ho", |
| 4368 | "hostname": "ho", |
| 4369 | "port": "", |
| 4370 | "pathname": "/i", |
| 4371 | "search": "", |
| 4372 | "hash": "" |
| 4373 | }, |
| 4374 | { |
| 4375 | "input": "/i", |
| 4376 | "base": "sc:///pa/pa", |
| 4377 | "href": "sc:///i", |
| 4378 | "origin": "null", |
| 4379 | "protocol": "sc:", |
| 4380 | "username": "", |
| 4381 | "password": "", |
| 4382 | "host": "", |
| 4383 | "hostname": "", |
| 4384 | "port": "", |
| 4385 | "pathname": "/i", |
| 4386 | "search": "", |
| 4387 | "hash": "" |
| 4388 | }, |
| 4389 | { |
| 4390 | "input": "?i", |
| 4391 | "base": "sc:sd", |
| 4392 | "failure": true |
| 4393 | }, |
| 4394 | { |
| 4395 | "input": "?i", |
| 4396 | "base": "sc:sd/sd", |
| 4397 | "failure": true |
| 4398 | }, |
| 4399 | { |
| 4400 | "input": "?i", |
| 4401 | "base": "sc:/pa/pa", |
| 4402 | "href": "sc:/pa/pa?i", |
| 4403 | "origin": "null", |
| 4404 | "protocol": "sc:", |
| 4405 | "username": "", |
| 4406 | "password": "", |
| 4407 | "host": "", |
| 4408 | "hostname": "", |
| 4409 | "port": "", |
| 4410 | "pathname": "/pa/pa", |
| 4411 | "search": "?i", |
| 4412 | "hash": "" |
| 4413 | }, |
| 4414 | { |
| 4415 | "input": "?i", |
| 4416 | "base": "sc://ho/pa", |
| 4417 | "href": "sc://ho/pa?i", |
| 4418 | "origin": "null", |
| 4419 | "protocol": "sc:", |
| 4420 | "username": "", |
| 4421 | "password": "", |
| 4422 | "host": "ho", |
| 4423 | "hostname": "ho", |
| 4424 | "port": "", |
| 4425 | "pathname": "/pa", |
| 4426 | "search": "?i", |
| 4427 | "hash": "" |
| 4428 | }, |
| 4429 | { |
| 4430 | "input": "?i", |
| 4431 | "base": "sc:///pa/pa", |
| 4432 | "href": "sc:///pa/pa?i", |
| 4433 | "origin": "null", |
| 4434 | "protocol": "sc:", |
| 4435 | "username": "", |
| 4436 | "password": "", |
| 4437 | "host": "", |
| 4438 | "hostname": "", |
| 4439 | "port": "", |
| 4440 | "pathname": "/pa/pa", |
| 4441 | "search": "?i", |
| 4442 | "hash": "" |
| 4443 | }, |
| 4444 | { |
| 4445 | "input": "#i", |
| 4446 | "base": "sc:sd", |
| 4447 | "href": "sc:sd#i", |
| 4448 | "origin": "null", |
| 4449 | "protocol": "sc:", |
| 4450 | "username": "", |
| 4451 | "password": "", |
| 4452 | "host": "", |
| 4453 | "hostname": "", |
| 4454 | "port": "", |
| 4455 | "pathname": "sd", |
| 4456 | "search": "", |
| 4457 | "hash": "#i" |
| 4458 | }, |
| 4459 | { |
| 4460 | "input": "#i", |
| 4461 | "base": "sc:sd/sd", |
| 4462 | "href": "sc:sd/sd#i", |
| 4463 | "origin": "null", |
| 4464 | "protocol": "sc:", |
| 4465 | "username": "", |
| 4466 | "password": "", |
| 4467 | "host": "", |
| 4468 | "hostname": "", |
| 4469 | "port": "", |
| 4470 | "pathname": "sd/sd", |
| 4471 | "search": "", |
| 4472 | "hash": "#i" |
| 4473 | }, |
| 4474 | { |
| 4475 | "input": "#i", |
| 4476 | "base": "sc:/pa/pa", |
| 4477 | "href": "sc:/pa/pa#i", |
| 4478 | "origin": "null", |
| 4479 | "protocol": "sc:", |
| 4480 | "username": "", |
| 4481 | "password": "", |
| 4482 | "host": "", |
| 4483 | "hostname": "", |
| 4484 | "port": "", |
| 4485 | "pathname": "/pa/pa", |
| 4486 | "search": "", |
| 4487 | "hash": "#i" |
| 4488 | }, |
| 4489 | { |
| 4490 | "input": "#i", |
| 4491 | "base": "sc://ho/pa", |
| 4492 | "href": "sc://ho/pa#i", |
| 4493 | "origin": "null", |
| 4494 | "protocol": "sc:", |
| 4495 | "username": "", |
| 4496 | "password": "", |
| 4497 | "host": "ho", |
| 4498 | "hostname": "ho", |
| 4499 | "port": "", |
| 4500 | "pathname": "/pa", |
| 4501 | "search": "", |
| 4502 | "hash": "#i" |
| 4503 | }, |
| 4504 | { |
| 4505 | "input": "#i", |
| 4506 | "base": "sc:///pa/pa", |
| 4507 | "href": "sc:///pa/pa#i", |
| 4508 | "origin": "null", |
| 4509 | "protocol": "sc:", |
| 4510 | "username": "", |
| 4511 | "password": "", |
| 4512 | "host": "", |
| 4513 | "hostname": "", |
| 4514 | "port": "", |
| 4515 | "pathname": "/pa/pa", |
| 4516 | "search": "", |
| 4517 | "hash": "#i" |
| 4518 | }, |
| 4519 | "# make sure that relative URL logic works on known typically non-relative schemes too", |
| 4520 | { |
| 4521 | "input": "about:/../", |
| 4522 | "base": null, |
| 4523 | "href": "about:/", |
| 4524 | "origin": "null", |
| 4525 | "protocol": "about:", |
| 4526 | "username": "", |
| 4527 | "password": "", |
| 4528 | "host": "", |
| 4529 | "hostname": "", |
| 4530 | "port": "", |
| 4531 | "pathname": "/", |
| 4532 | "search": "", |
| 4533 | "hash": "" |
| 4534 | }, |
| 4535 | { |
| 4536 | "input": "data:/../", |
| 4537 | "base": null, |
| 4538 | "href": "data:/", |
| 4539 | "origin": "null", |
| 4540 | "protocol": "data:", |
| 4541 | "username": "", |
| 4542 | "password": "", |
| 4543 | "host": "", |
| 4544 | "hostname": "", |
| 4545 | "port": "", |
| 4546 | "pathname": "/", |
| 4547 | "search": "", |
| 4548 | "hash": "" |
| 4549 | }, |
| 4550 | { |
| 4551 | "input": "javascript:/../", |
| 4552 | "base": null, |
| 4553 | "href": "javascript:/", |
| 4554 | "origin": "null", |
| 4555 | "protocol": "javascript:", |
| 4556 | "username": "", |
| 4557 | "password": "", |
| 4558 | "host": "", |
| 4559 | "hostname": "", |
| 4560 | "port": "", |
| 4561 | "pathname": "/", |
| 4562 | "search": "", |
| 4563 | "hash": "" |
| 4564 | }, |
| 4565 | { |
| 4566 | "input": "mailto:/../", |
| 4567 | "base": null, |
| 4568 | "href": "mailto:/", |
| 4569 | "origin": "null", |
| 4570 | "protocol": "mailto:", |
| 4571 | "username": "", |
| 4572 | "password": "", |
| 4573 | "host": "", |
| 4574 | "hostname": "", |
| 4575 | "port": "", |
| 4576 | "pathname": "/", |
| 4577 | "search": "", |
| 4578 | "hash": "" |
| 4579 | }, |
| 4580 | "# unknown schemes and their hosts", |
| 4581 | { |
| 4582 | "input": "sc://ñ.test/", |
| 4583 | "base": null, |
| 4584 | "href": "sc://%C3%B1.test/", |
| 4585 | "origin": "null", |
| 4586 | "protocol": "sc:", |
| 4587 | "username": "", |
| 4588 | "password": "", |
| 4589 | "host": "%C3%B1.test", |
| 4590 | "hostname": "%C3%B1.test", |
| 4591 | "port": "", |
| 4592 | "pathname": "/", |
| 4593 | "search": "", |
| 4594 | "hash": "" |
| 4595 | }, |
| 4596 | { |
| 4597 | "input": "sc://%/", |
| 4598 | "base": null, |
| 4599 | "href": "sc://%/", |
| 4600 | "protocol": "sc:", |
| 4601 | "username": "", |
| 4602 | "password": "", |
| 4603 | "host": "%", |
| 4604 | "hostname": "%", |
| 4605 | "port": "", |
| 4606 | "pathname": "/", |
| 4607 | "search": "", |
| 4608 | "hash": "" |
| 4609 | }, |
| 4610 | { |
| 4611 | "input": "sc://@/", |
| 4612 | "base": null, |
| 4613 | "failure": true |
| 4614 | }, |
| 4615 | { |
| 4616 | "input": "sc://te@s:t@/", |
| 4617 | "base": null, |
| 4618 | "failure": true |
| 4619 | }, |
| 4620 | { |
| 4621 | "input": "sc://:/", |
| 4622 | "base": null, |
| 4623 | "failure": true |
| 4624 | }, |
| 4625 | { |
| 4626 | "input": "sc://:12/", |
| 4627 | "base": null, |
| 4628 | "failure": true |
| 4629 | }, |
| 4630 | { |
| 4631 | "input": "x", |
| 4632 | "base": "sc://ñ", |
| 4633 | "href": "sc://%C3%B1/x", |
| 4634 | "origin": "null", |
| 4635 | "protocol": "sc:", |
| 4636 | "username": "", |
| 4637 | "password": "", |
| 4638 | "host": "%C3%B1", |
| 4639 | "hostname": "%C3%B1", |
| 4640 | "port": "", |
| 4641 | "pathname": "/x", |
| 4642 | "search": "", |
| 4643 | "hash": "" |
| 4644 | }, |
| 4645 | "# unknown schemes and backslashes", |
| 4646 | { |
| 4647 | "input": "sc:\\../", |
| 4648 | "base": null, |
| 4649 | "href": "sc:\\../", |
| 4650 | "origin": "null", |
| 4651 | "protocol": "sc:", |
| 4652 | "username": "", |
| 4653 | "password": "", |
| 4654 | "host": "", |
| 4655 | "hostname": "", |
| 4656 | "port": "", |
| 4657 | "pathname": "\\../", |
| 4658 | "search": "", |
| 4659 | "hash": "" |
| 4660 | }, |
| 4661 | "# unknown scheme with path looking like a password", |
| 4662 | { |
| 4663 | "input": "sc::[email protected]", |
| 4664 | "base": null, |
| 4665 | "href": "sc::[email protected]", |
| 4666 | "origin": "null", |
| 4667 | "protocol": "sc:", |
| 4668 | "username": "", |
| 4669 | "password": "", |
| 4670 | "host": "", |
| 4671 | "hostname": "", |
| 4672 | "port": "", |
| 4673 | "pathname": ":[email protected]", |
| 4674 | "search": "", |
| 4675 | "hash": "" |
| 4676 | }, |
| 4677 | "# unknown scheme with bogus percent-encoding", |
| 4678 | { |
| 4679 | "input": "wow:%NBD", |
| 4680 | "base": null, |
| 4681 | "href": "wow:%NBD", |
| 4682 | "origin": "null", |
| 4683 | "protocol": "wow:", |
| 4684 | "username": "", |
| 4685 | "password": "", |
| 4686 | "host": "", |
| 4687 | "hostname": "", |
| 4688 | "port": "", |
| 4689 | "pathname": "%NBD", |
| 4690 | "search": "", |
| 4691 | "hash": "" |
| 4692 | }, |
| 4693 | { |
| 4694 | "input": "wow:%1G", |
| 4695 | "base": null, |
| 4696 | "href": "wow:%1G", |
| 4697 | "origin": "null", |
| 4698 | "protocol": "wow:", |
| 4699 | "username": "", |
| 4700 | "password": "", |
| 4701 | "host": "", |
| 4702 | "hostname": "", |
| 4703 | "port": "", |
| 4704 | "pathname": "%1G", |
| 4705 | "search": "", |
| 4706 | "hash": "" |
| 4707 | }, |
| 4708 | "# unknown scheme with non-URL characters", |
| 4709 | { |
| 4710 | "input": "wow:\uFFFF", |
| 4711 | "base": null, |
| 4712 | "href": "wow:%EF%BF%BF", |
| 4713 | "origin": "null", |
| 4714 | "protocol": "wow:", |
| 4715 | "username": "", |
| 4716 | "password": "", |
| 4717 | "host": "", |
| 4718 | "hostname": "", |
| 4719 | "port": "", |
| 4720 | "pathname": "%EF%BF%BF", |
| 4721 | "search": "", |
| 4722 | "hash": "" |
| 4723 | }, |
| 4724 | "Forbidden host code points", |
| 4725 | { |
| 4726 | "input": "sc://a\u0000b/", |
| 4727 | "base": null, |
| 4728 | "failure": true |
| 4729 | }, |
| 4730 | { |
| 4731 | "input": "sc://a b/", |
| 4732 | "base": null, |
| 4733 | "failure": true |
| 4734 | }, |
| 4735 | { |
| 4736 | "input": "sc://a<b", |
| 4737 | "base": null, |
| 4738 | "failure": true |
| 4739 | }, |
| 4740 | { |
| 4741 | "input": "sc://a>b", |
| 4742 | "base": null, |
| 4743 | "failure": true |
| 4744 | }, |
| 4745 | { |
| 4746 | "input": "sc://a[b/", |
| 4747 | "base": null, |
| 4748 | "failure": true |
| 4749 | }, |
| 4750 | { |
| 4751 | "input": "sc://a\\b/", |
| 4752 | "base": null, |
| 4753 | "failure": true |
| 4754 | }, |
| 4755 | { |
| 4756 | "input": "sc://a]b/", |
| 4757 | "base": null, |
| 4758 | "failure": true |
| 4759 | }, |
| 4760 | { |
| 4761 | "input": "sc://a^b", |
| 4762 | "base": null, |
| 4763 | "failure": true |
| 4764 | }, |
| 4765 | { |
| 4766 | "input": "sc://a|b/", |
| 4767 | "base": null, |
| 4768 | "failure": true |
| 4769 | }, |
| 4770 | "Forbidden host codepoints: tabs and newlines are removed during preprocessing", |
| 4771 | { |
| 4772 | "input": "foo://ho\u0009st/", |
| 4773 | "base": null, |
| 4774 | "hash": "", |
| 4775 | "host": "host", |
| 4776 | "hostname": "host", |
| 4777 | "href":"foo://host/", |
| 4778 | "password": "", |
| 4779 | "pathname": "/", |
| 4780 | "port":"", |
| 4781 | "protocol": "foo:", |
| 4782 | "search": "", |
| 4783 | "username": "" |
| 4784 | }, |
| 4785 | { |
| 4786 | "input": "foo://ho\u000Ast/", |
| 4787 | "base": null, |
| 4788 | "hash": "", |
| 4789 | "host": "host", |
| 4790 | "hostname": "host", |
| 4791 | "href":"foo://host/", |
| 4792 | "password": "", |
| 4793 | "pathname": "/", |
| 4794 | "port":"", |
| 4795 | "protocol": "foo:", |
| 4796 | "search": "", |
| 4797 | "username": "" |
| 4798 | }, |
| 4799 | { |
| 4800 | "input": "foo://ho\u000Dst/", |
| 4801 | "base": null, |
| 4802 | "hash": "", |
| 4803 | "host": "host", |
| 4804 | "hostname": "host", |
| 4805 | "href":"foo://host/", |
| 4806 | "password": "", |
| 4807 | "pathname": "/", |
| 4808 | "port":"", |
| 4809 | "protocol": "foo:", |
| 4810 | "search": "", |
| 4811 | "username": "" |
| 4812 | }, |
| 4813 | "Forbidden domain code-points", |
| 4814 | { |
| 4815 | "input": "http://a\u0000b/", |
| 4816 | "base": null, |
| 4817 | "failure": true |
| 4818 | }, |
| 4819 | { |
| 4820 | "input": "http://a\u0001b/", |
| 4821 | "base": null, |
| 4822 | "failure": true |
| 4823 | }, |
| 4824 | { |
| 4825 | "input": "http://a\u0002b/", |
| 4826 | "base": null, |
| 4827 | "failure": true |
| 4828 | }, |
| 4829 | { |
| 4830 | "input": "http://a\u0003b/", |
| 4831 | "base": null, |
| 4832 | "failure": true |
| 4833 | }, |
| 4834 | { |
| 4835 | "input": "http://a\u0004b/", |
| 4836 | "base": null, |
| 4837 | "failure": true |
| 4838 | }, |
| 4839 | { |
| 4840 | "input": "http://a\u0005b/", |
| 4841 | "base": null, |
| 4842 | "failure": true |
| 4843 | }, |
| 4844 | { |
| 4845 | "input": "http://a\u0006b/", |
| 4846 | "base": null, |
| 4847 | "failure": true |
| 4848 | }, |
| 4849 | { |
| 4850 | "input": "http://a\u0007b/", |
| 4851 | "base": null, |
| 4852 | "failure": true |
| 4853 | }, |
| 4854 | { |
| 4855 | "input": "http://a\u0008b/", |
| 4856 | "base": null, |
| 4857 | "failure": true |
| 4858 | }, |
| 4859 | { |
| 4860 | "input": "http://a\u000Bb/", |
| 4861 | "base": null, |
| 4862 | "failure": true |
| 4863 | }, |
| 4864 | { |
| 4865 | "input": "http://a\u000Cb/", |
| 4866 | "base": null, |
| 4867 | "failure": true |
| 4868 | }, |
| 4869 | { |
| 4870 | "input": "http://a\u000Eb/", |
| 4871 | "base": null, |
| 4872 | "failure": true |
| 4873 | }, |
| 4874 | { |
| 4875 | "input": "http://a\u000Fb/", |
| 4876 | "base": null, |
| 4877 | "failure": true |
| 4878 | }, |
| 4879 | { |
| 4880 | "input": "http://a\u0010b/", |
| 4881 | "base": null, |
| 4882 | "failure": true |
| 4883 | }, |
| 4884 | { |
| 4885 | "input": "http://a\u0011b/", |
| 4886 | "base": null, |
| 4887 | "failure": true |
| 4888 | }, |
| 4889 | { |
| 4890 | "input": "http://a\u0012b/", |
| 4891 | "base": null, |
| 4892 | "failure": true |
| 4893 | }, |
| 4894 | { |
| 4895 | "input": "http://a\u0013b/", |
| 4896 | "base": null, |
| 4897 | "failure": true |
| 4898 | }, |
| 4899 | { |
| 4900 | "input": "http://a\u0014b/", |
| 4901 | "base": null, |
| 4902 | "failure": true |
| 4903 | }, |
| 4904 | { |
| 4905 | "input": "http://a\u0015b/", |
| 4906 | "base": null, |
| 4907 | "failure": true |
| 4908 | }, |
| 4909 | { |
| 4910 | "input": "http://a\u0016b/", |
| 4911 | "base": null, |
| 4912 | "failure": true |
| 4913 | }, |
| 4914 | { |
| 4915 | "input": "http://a\u0017b/", |
| 4916 | "base": null, |
| 4917 | "failure": true |
| 4918 | }, |
| 4919 | { |
| 4920 | "input": "http://a\u0018b/", |
| 4921 | "base": null, |
| 4922 | "failure": true |
| 4923 | }, |
| 4924 | { |
| 4925 | "input": "http://a\u0019b/", |
| 4926 | "base": null, |
| 4927 | "failure": true |
| 4928 | }, |
| 4929 | { |
| 4930 | "input": "http://a\u001Ab/", |
| 4931 | "base": null, |
| 4932 | "failure": true |
| 4933 | }, |
| 4934 | { |
| 4935 | "input": "http://a\u001Bb/", |
| 4936 | "base": null, |
| 4937 | "failure": true |
| 4938 | }, |
| 4939 | { |
| 4940 | "input": "http://a\u001Cb/", |
| 4941 | "base": null, |
| 4942 | "failure": true |
| 4943 | }, |
| 4944 | { |
| 4945 | "input": "http://a\u001Db/", |
| 4946 | "base": null, |
| 4947 | "failure": true |
| 4948 | }, |
| 4949 | { |
| 4950 | "input": "http://a\u001Eb/", |
| 4951 | "base": null, |
| 4952 | "failure": true |
| 4953 | }, |
| 4954 | { |
| 4955 | "input": "http://a\u001Fb/", |
| 4956 | "base": null, |
| 4957 | "failure": true |
| 4958 | }, |
| 4959 | { |
| 4960 | "input": "http://a b/", |
| 4961 | "base": null, |
| 4962 | "failure": true |
| 4963 | }, |
| 4964 | { |
| 4965 | "input": "http://a%b/", |
| 4966 | "base": null, |
| 4967 | "failure": true |
| 4968 | }, |
| 4969 | { |
| 4970 | "input": "http://a<b", |
| 4971 | "base": null, |
| 4972 | "failure": true |
| 4973 | }, |
| 4974 | { |
| 4975 | "input": "http://a>b", |
| 4976 | "base": null, |
| 4977 | "failure": true |
| 4978 | }, |
| 4979 | { |
| 4980 | "input": "http://a[b/", |
| 4981 | "base": null, |
| 4982 | "failure": true |
| 4983 | }, |
| 4984 | { |
| 4985 | "input": "http://a]b/", |
| 4986 | "base": null, |
| 4987 | "failure": true |
| 4988 | }, |
| 4989 | { |
| 4990 | "input": "http://a^b", |
| 4991 | "base": null, |
| 4992 | "failure": true |
| 4993 | }, |
| 4994 | { |
| 4995 | "input": "http://a|b/", |
| 4996 | "base": null, |
| 4997 | "failure": true |
| 4998 | }, |
| 4999 | { |
| 5000 | "input": "http://a\u007Fb/", |
| 5001 | "base": null, |
| 5002 | "failure": true |
| 5003 | }, |
| 5004 | "Forbidden domain codepoints: tabs and newlines are removed during preprocessing", |
| 5005 | { |
| 5006 | "input": "http://ho\u0009st/", |
| 5007 | "base": null, |
| 5008 | "hash": "", |
| 5009 | "host": "host", |
| 5010 | "hostname": "host", |
| 5011 | "href":"http://host/", |
| 5012 | "password": "", |
| 5013 | "pathname": "/", |
| 5014 | "port":"", |
| 5015 | "protocol": "http:", |
| 5016 | "search": "", |
| 5017 | "username": "" |
| 5018 | }, |
| 5019 | { |
| 5020 | "input": "http://ho\u000Ast/", |
| 5021 | "base": null, |
| 5022 | "hash": "", |
| 5023 | "host": "host", |
| 5024 | "hostname": "host", |
| 5025 | "href":"http://host/", |
| 5026 | "password": "", |
| 5027 | "pathname": "/", |
| 5028 | "port":"", |
| 5029 | "protocol": "http:", |
| 5030 | "search": "", |
| 5031 | "username": "" |
| 5032 | }, |
| 5033 | { |
| 5034 | "input": "http://ho\u000Dst/", |
| 5035 | "base": null, |
| 5036 | "hash": "", |
| 5037 | "host": "host", |
| 5038 | "hostname": "host", |
| 5039 | "href":"http://host/", |
| 5040 | "password": "", |
| 5041 | "pathname": "/", |
| 5042 | "port":"", |
| 5043 | "protocol": "http:", |
| 5044 | "search": "", |
| 5045 | "username": "" |
| 5046 | }, |
| 5047 | "Encoded forbidden domain codepoints in special URLs", |
| 5048 | { |
| 5049 | "input": "http://ho%00st/", |
| 5050 | "base": null, |
| 5051 | "failure": true |
| 5052 | }, |
| 5053 | { |
| 5054 | "input": "http://ho%01st/", |
| 5055 | "base": null, |
| 5056 | "failure": true |
| 5057 | }, |
| 5058 | { |
| 5059 | "input": "http://ho%02st/", |
| 5060 | "base": null, |
| 5061 | "failure": true |
| 5062 | }, |
| 5063 | { |
| 5064 | "input": "http://ho%03st/", |
| 5065 | "base": null, |
| 5066 | "failure": true |
| 5067 | }, |
| 5068 | { |
| 5069 | "input": "http://ho%04st/", |
| 5070 | "base": null, |
| 5071 | "failure": true |
| 5072 | }, |
| 5073 | { |
| 5074 | "input": "http://ho%05st/", |
| 5075 | "base": null, |
| 5076 | "failure": true |
| 5077 | }, |
| 5078 | { |
| 5079 | "input": "http://ho%06st/", |
| 5080 | "base": null, |
| 5081 | "failure": true |
| 5082 | }, |
| 5083 | { |
| 5084 | "input": "http://ho%07st/", |
| 5085 | "base": null, |
| 5086 | "failure": true |
| 5087 | }, |
| 5088 | { |
| 5089 | "input": "http://ho%08st/", |
| 5090 | "base": null, |
| 5091 | "failure": true |
| 5092 | }, |
| 5093 | { |
| 5094 | "input": "http://ho%09st/", |
| 5095 | "base": null, |
| 5096 | "failure": true |
| 5097 | }, |
| 5098 | { |
| 5099 | "input": "http://ho%0Ast/", |
| 5100 | "base": null, |
| 5101 | "failure": true |
| 5102 | }, |
| 5103 | { |
| 5104 | "input": "http://ho%0Bst/", |
| 5105 | "base": null, |
| 5106 | "failure": true |
| 5107 | }, |
| 5108 | { |
| 5109 | "input": "http://ho%0Cst/", |
| 5110 | "base": null, |
| 5111 | "failure": true |
| 5112 | }, |
| 5113 | { |
| 5114 | "input": "http://ho%0Dst/", |
| 5115 | "base": null, |
| 5116 | "failure": true |
| 5117 | }, |
| 5118 | { |
| 5119 | "input": "http://ho%0Est/", |
| 5120 | "base": null, |
| 5121 | "failure": true |
| 5122 | }, |
| 5123 | { |
| 5124 | "input": "http://ho%0Fst/", |
| 5125 | "base": null, |
| 5126 | "failure": true |
| 5127 | }, |
| 5128 | { |
| 5129 | "input": "http://ho%10st/", |
| 5130 | "base": null, |
| 5131 | "failure": true |
| 5132 | }, |
| 5133 | { |
| 5134 | "input": "http://ho%11st/", |
| 5135 | "base": null, |
| 5136 | "failure": true |
| 5137 | }, |
| 5138 | { |
| 5139 | "input": "http://ho%12st/", |
| 5140 | "base": null, |
| 5141 | "failure": true |
| 5142 | }, |
| 5143 | { |
| 5144 | "input": "http://ho%13st/", |
| 5145 | "base": null, |
| 5146 | "failure": true |
| 5147 | }, |
| 5148 | { |
| 5149 | "input": "http://ho%14st/", |
| 5150 | "base": null, |
| 5151 | "failure": true |
| 5152 | }, |
| 5153 | { |
| 5154 | "input": "http://ho%15st/", |
| 5155 | "base": null, |
| 5156 | "failure": true |
| 5157 | }, |
| 5158 | { |
| 5159 | "input": "http://ho%16st/", |
| 5160 | "base": null, |
| 5161 | "failure": true |
| 5162 | }, |
| 5163 | { |
| 5164 | "input": "http://ho%17st/", |
| 5165 | "base": null, |
| 5166 | "failure": true |
| 5167 | }, |
| 5168 | { |
| 5169 | "input": "http://ho%18st/", |
| 5170 | "base": null, |
| 5171 | "failure": true |
| 5172 | }, |
| 5173 | { |
| 5174 | "input": "http://ho%19st/", |
| 5175 | "base": null, |
| 5176 | "failure": true |
| 5177 | }, |
| 5178 | { |
| 5179 | "input": "http://ho%1Ast/", |
| 5180 | "base": null, |
| 5181 | "failure": true |
| 5182 | }, |
| 5183 | { |
| 5184 | "input": "http://ho%1Bst/", |
| 5185 | "base": null, |
| 5186 | "failure": true |
| 5187 | }, |
| 5188 | { |
| 5189 | "input": "http://ho%1Cst/", |
| 5190 | "base": null, |
| 5191 | "failure": true |
| 5192 | }, |
| 5193 | { |
| 5194 | "input": "http://ho%1Dst/", |
| 5195 | "base": null, |
| 5196 | "failure": true |
| 5197 | }, |
| 5198 | { |
| 5199 | "input": "http://ho%1Est/", |
| 5200 | "base": null, |
| 5201 | "failure": true |
| 5202 | }, |
| 5203 | { |
| 5204 | "input": "http://ho%1Fst/", |
| 5205 | "base": null, |
| 5206 | "failure": true |
| 5207 | }, |
| 5208 | { |
| 5209 | "input": "http://ho%20st/", |
| 5210 | "base": null, |
| 5211 | "failure": true |
| 5212 | }, |
| 5213 | { |
| 5214 | "input": "http://ho%23st/", |
| 5215 | "base": null, |
| 5216 | "failure": true |
| 5217 | }, |
| 5218 | { |
| 5219 | "input": "http://ho%25st/", |
| 5220 | "base": null, |
| 5221 | "failure": true |
| 5222 | }, |
| 5223 | { |
| 5224 | "input": "http://ho%2Fst/", |
| 5225 | "base": null, |
| 5226 | "failure": true |
| 5227 | }, |
| 5228 | { |
| 5229 | "input": "http://ho%3Ast/", |
| 5230 | "base": null, |
| 5231 | "failure": true |
| 5232 | }, |
| 5233 | { |
| 5234 | "input": "http://ho%3Cst/", |
| 5235 | "base": null, |
| 5236 | "failure": true |
| 5237 | }, |
| 5238 | { |
| 5239 | "input": "http://ho%3Est/", |
| 5240 | "base": null, |
| 5241 | "failure": true |
| 5242 | }, |
| 5243 | { |
| 5244 | "input": "http://ho%3Fst/", |
| 5245 | "base": null, |
| 5246 | "failure": true |
| 5247 | }, |
| 5248 | { |
| 5249 | "input": "http://ho%40st/", |
| 5250 | "base": null, |
| 5251 | "failure": true |
| 5252 | }, |
| 5253 | { |
| 5254 | "input": "http://ho%5Bst/", |
| 5255 | "base": null, |
| 5256 | "failure": true |
| 5257 | }, |
| 5258 | { |
| 5259 | "input": "http://ho%5Cst/", |
| 5260 | "base": null, |
| 5261 | "failure": true |
| 5262 | }, |
| 5263 | { |
| 5264 | "input": "http://ho%5Dst/", |
| 5265 | "base": null, |
| 5266 | "failure": true |
| 5267 | }, |
| 5268 | { |
| 5269 | "input": "http://ho%7Cst/", |
| 5270 | "base": null, |
| 5271 | "failure": true |
| 5272 | }, |
| 5273 | { |
| 5274 | "input": "http://ho%7Fst/", |
| 5275 | "base": null, |
| 5276 | "failure": true |
| 5277 | }, |
| 5278 | "Allowed host/domain code points", |
| 5279 | { |
| 5280 | "input": "http://!\"$&'()*+,-.;=_`{}~/", |
| 5281 | "base": null, |
| 5282 | "href": "http://!\"$&'()*+,-.;=_`{}~/", |
| 5283 | "origin": "http://!\"$&'()*+,-.;=_`{}~", |
| 5284 | "protocol": "http:", |
| 5285 | "username": "", |
| 5286 | "password": "", |
| 5287 | "host": "!\"$&'()*+,-.;=_`{}~", |
| 5288 | "hostname": "!\"$&'()*+,-.;=_`{}~", |
| 5289 | "port": "", |
| 5290 | "pathname": "/", |
| 5291 | "search": "", |
| 5292 | "hash": "" |
| 5293 | }, |
| 5294 | { |
| 5295 | "input": "sc://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$%&'()*+,-.;=_`{}~/", |
| 5296 | "base": null, |
| 5297 | "href": "sc://%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~/", |
| 5298 | "origin": "null", |
| 5299 | "protocol": "sc:", |
| 5300 | "username": "", |
| 5301 | "password": "", |
| 5302 | "host": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~", |
| 5303 | "hostname": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~", |
| 5304 | "port": "", |
| 5305 | "pathname": "/", |
| 5306 | "search": "", |
| 5307 | "hash": "" |
| 5308 | }, |
| 5309 | "# Hosts and percent-encoding", |
| 5310 | { |
| 5311 | "input": "ftp://example.com%80/", |
| 5312 | "base": null, |
| 5313 | "failure": true |
| 5314 | }, |
| 5315 | { |
| 5316 | "input": "ftp://example.com%A0/", |
| 5317 | "base": null, |
| 5318 | "failure": true |
| 5319 | }, |
| 5320 | { |
| 5321 | "input": "https://example.com%80/", |
| 5322 | "base": null, |
| 5323 | "failure": true |
| 5324 | }, |
| 5325 | { |
| 5326 | "input": "https://example.com%A0/", |
| 5327 | "base": null, |
| 5328 | "failure": true |
| 5329 | }, |
| 5330 | { |
| 5331 | "input": "ftp://%e2%98%83", |
| 5332 | "base": null, |
| 5333 | "href": "ftp://xn--n3h/", |
| 5334 | "origin": "ftp://xn--n3h", |
| 5335 | "protocol": "ftp:", |
| 5336 | "username": "", |
| 5337 | "password": "", |
| 5338 | "host": "xn--n3h", |
| 5339 | "hostname": "xn--n3h", |
| 5340 | "port": "", |
| 5341 | "pathname": "/", |
| 5342 | "search": "", |
| 5343 | "hash": "" |
| 5344 | }, |
| 5345 | { |
| 5346 | "input": "https://%e2%98%83", |
| 5347 | "base": null, |
| 5348 | "href": "https://xn--n3h/", |
| 5349 | "origin": "https://xn--n3h", |
| 5350 | "protocol": "https:", |
| 5351 | "username": "", |
| 5352 | "password": "", |
| 5353 | "host": "xn--n3h", |
| 5354 | "hostname": "xn--n3h", |
| 5355 | "port": "", |
| 5356 | "pathname": "/", |
| 5357 | "search": "", |
| 5358 | "hash": "" |
| 5359 | }, |
| 5360 | "# tests from jsdom/whatwg-url designed for code coverage", |
| 5361 | { |
| 5362 | "input": "http://127.0.0.1:10100/relative_import.html", |
| 5363 | "base": null, |
| 5364 | "href": "http://127.0.0.1:10100/relative_import.html", |
| 5365 | "origin": "http://127.0.0.1:10100", |
| 5366 | "protocol": "http:", |
| 5367 | "username": "", |
| 5368 | "password": "", |
| 5369 | "host": "127.0.0.1:10100", |
| 5370 | "hostname": "127.0.0.1", |
| 5371 | "port": "10100", |
| 5372 | "pathname": "/relative_import.html", |
| 5373 | "search": "", |
| 5374 | "hash": "" |
| 5375 | }, |
| 5376 | { |
| 5377 | "input": "http://facebook.com/?foo=%7B%22abc%22", |
| 5378 | "base": null, |
| 5379 | "href": "http://facebook.com/?foo=%7B%22abc%22", |
| 5380 | "origin": "http://facebook.com", |
| 5381 | "protocol": "http:", |
| 5382 | "username": "", |
| 5383 | "password": "", |
| 5384 | "host": "facebook.com", |
| 5385 | "hostname": "facebook.com", |
| 5386 | "port": "", |
| 5387 | "pathname": "/", |
| 5388 | "search": "?foo=%7B%22abc%22", |
| 5389 | "hash": "" |
| 5390 | }, |
| 5391 | { |
| 5392 | "input": "https://localhost:3000/[email protected]", |
| 5393 | "base": null, |
| 5394 | "href": "https://localhost:3000/[email protected]", |
| 5395 | "origin": "https://localhost:3000", |
| 5396 | "protocol": "https:", |
| 5397 | "username": "", |
| 5398 | "password": "", |
| 5399 | "host": "localhost:3000", |
| 5400 | "hostname": "localhost", |
| 5401 | "port": "3000", |
| 5402 | "pathname": "/[email protected]", |
| 5403 | "search": "", |
| 5404 | "hash": "" |
| 5405 | }, |
| 5406 | "# tab/LF/CR", |
| 5407 | { |
| 5408 | "input": "h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg", |
| 5409 | "base": null, |
| 5410 | "href": "http://host:9000/path?query#frag", |
| 5411 | "origin": "http://host:9000", |
| 5412 | "protocol": "http:", |
| 5413 | "username": "", |
| 5414 | "password": "", |
| 5415 | "host": "host:9000", |
| 5416 | "hostname": "host", |
| 5417 | "port": "9000", |
| 5418 | "pathname": "/path", |
| 5419 | "search": "?query", |
| 5420 | "hash": "#frag" |
| 5421 | }, |
| 5422 | "# Stringification of URL.searchParams", |
| 5423 | { |
| 5424 | "input": "?a=b&c=d", |
| 5425 | "base": "http://example.org/foo/bar", |
| 5426 | "href": "http://example.org/foo/bar?a=b&c=d", |
| 5427 | "origin": "http://example.org", |
| 5428 | "protocol": "http:", |
| 5429 | "username": "", |
| 5430 | "password": "", |
| 5431 | "host": "example.org", |
| 5432 | "hostname": "example.org", |
| 5433 | "port": "", |
| 5434 | "pathname": "/foo/bar", |
| 5435 | "search": "?a=b&c=d", |
| 5436 | "searchParams": "a=b&c=d", |
| 5437 | "hash": "" |
| 5438 | }, |
| 5439 | { |
| 5440 | "input": "??a=b&c=d", |
| 5441 | "base": "http://example.org/foo/bar", |
| 5442 | "href": "http://example.org/foo/bar??a=b&c=d", |
| 5443 | "origin": "http://example.org", |
| 5444 | "protocol": "http:", |
| 5445 | "username": "", |
| 5446 | "password": "", |
| 5447 | "host": "example.org", |
| 5448 | "hostname": "example.org", |
| 5449 | "port": "", |
| 5450 | "pathname": "/foo/bar", |
| 5451 | "search": "??a=b&c=d", |
| 5452 | "searchParams": "%3Fa=b&c=d", |
| 5453 | "hash": "" |
| 5454 | }, |
| 5455 | "# Scheme only", |
| 5456 | { |
| 5457 | "input": "http:", |
| 5458 | "base": "http://example.org/foo/bar", |
| 5459 | "href": "http://example.org/foo/bar", |
| 5460 | "origin": "http://example.org", |
| 5461 | "protocol": "http:", |
| 5462 | "username": "", |
| 5463 | "password": "", |
| 5464 | "host": "example.org", |
| 5465 | "hostname": "example.org", |
| 5466 | "port": "", |
| 5467 | "pathname": "/foo/bar", |
| 5468 | "search": "", |
| 5469 | "searchParams": "", |
| 5470 | "hash": "" |
| 5471 | }, |
| 5472 | { |
| 5473 | "input": "http:", |
| 5474 | "base": "https://example.org/foo/bar", |
| 5475 | "failure": true |
| 5476 | }, |
| 5477 | { |
| 5478 | "input": "sc:", |
| 5479 | "base": "https://example.org/foo/bar", |
| 5480 | "href": "sc:", |
| 5481 | "origin": "null", |
| 5482 | "protocol": "sc:", |
| 5483 | "username": "", |
| 5484 | "password": "", |
| 5485 | "host": "", |
| 5486 | "hostname": "", |
| 5487 | "port": "", |
| 5488 | "pathname": "", |
| 5489 | "search": "", |
| 5490 | "searchParams": "", |
| 5491 | "hash": "" |
| 5492 | }, |
| 5493 | "# Percent encoding of fragments", |
| 5494 | { |
| 5495 | "input": "http://foo.bar/baz?qux#foo\bbar", |
| 5496 | "base": null, |
| 5497 | "href": "http://foo.bar/baz?qux#foo%08bar", |
| 5498 | "origin": "http://foo.bar", |
| 5499 | "protocol": "http:", |
| 5500 | "username": "", |
| 5501 | "password": "", |
| 5502 | "host": "foo.bar", |
| 5503 | "hostname": "foo.bar", |
| 5504 | "port": "", |
| 5505 | "pathname": "/baz", |
| 5506 | "search": "?qux", |
| 5507 | "searchParams": "qux=", |
| 5508 | "hash": "#foo%08bar" |
| 5509 | }, |
| 5510 | { |
| 5511 | "input": "http://foo.bar/baz?qux#foo\"bar", |
| 5512 | "base": null, |
| 5513 | "href": "http://foo.bar/baz?qux#foo%22bar", |
| 5514 | "origin": "http://foo.bar", |
| 5515 | "protocol": "http:", |
| 5516 | "username": "", |
| 5517 | "password": "", |
| 5518 | "host": "foo.bar", |
| 5519 | "hostname": "foo.bar", |
| 5520 | "port": "", |
| 5521 | "pathname": "/baz", |
| 5522 | "search": "?qux", |
| 5523 | "searchParams": "qux=", |
| 5524 | "hash": "#foo%22bar" |
| 5525 | }, |
| 5526 | { |
| 5527 | "input": "http://foo.bar/baz?qux#foo<bar", |
| 5528 | "base": null, |
| 5529 | "href": "http://foo.bar/baz?qux#foo%3Cbar", |
| 5530 | "origin": "http://foo.bar", |
| 5531 | "protocol": "http:", |
| 5532 | "username": "", |
| 5533 | "password": "", |
| 5534 | "host": "foo.bar", |
| 5535 | "hostname": "foo.bar", |
| 5536 | "port": "", |
| 5537 | "pathname": "/baz", |
| 5538 | "search": "?qux", |
| 5539 | "searchParams": "qux=", |
| 5540 | "hash": "#foo%3Cbar" |
| 5541 | }, |
| 5542 | { |
| 5543 | "input": "http://foo.bar/baz?qux#foo>bar", |
| 5544 | "base": null, |
| 5545 | "href": "http://foo.bar/baz?qux#foo%3Ebar", |
| 5546 | "origin": "http://foo.bar", |
| 5547 | "protocol": "http:", |
| 5548 | "username": "", |
| 5549 | "password": "", |
| 5550 | "host": "foo.bar", |
| 5551 | "hostname": "foo.bar", |
| 5552 | "port": "", |
| 5553 | "pathname": "/baz", |
| 5554 | "search": "?qux", |
| 5555 | "searchParams": "qux=", |
| 5556 | "hash": "#foo%3Ebar" |
| 5557 | }, |
| 5558 | { |
| 5559 | "input": "http://foo.bar/baz?qux#foo`bar", |
| 5560 | "base": null, |
| 5561 | "href": "http://foo.bar/baz?qux#foo%60bar", |
| 5562 | "origin": "http://foo.bar", |
| 5563 | "protocol": "http:", |
| 5564 | "username": "", |
| 5565 | "password": "", |
| 5566 | "host": "foo.bar", |
| 5567 | "hostname": "foo.bar", |
| 5568 | "port": "", |
| 5569 | "pathname": "/baz", |
| 5570 | "search": "?qux", |
| 5571 | "searchParams": "qux=", |
| 5572 | "hash": "#foo%60bar" |
| 5573 | }, |
| 5574 | "# IPv4 parsing (via https://github.com/nodejs/node/pull/10317)", |
| 5575 | { |
| 5576 | "input": "http://1.2.3.4/", |
| 5577 | "base": "http://other.com/", |
| 5578 | "href": "http://1.2.3.4/", |
| 5579 | "origin": "http://1.2.3.4", |
| 5580 | "protocol": "http:", |
| 5581 | "username": "", |
| 5582 | "password": "", |
| 5583 | "host": "1.2.3.4", |
| 5584 | "hostname": "1.2.3.4", |
| 5585 | "port": "", |
| 5586 | "pathname": "/", |
| 5587 | "search": "", |
| 5588 | "hash": "" |
| 5589 | }, |
| 5590 | { |
| 5591 | "input": "http://1.2.3.4./", |
| 5592 | "base": "http://other.com/", |
| 5593 | "href": "http://1.2.3.4/", |
| 5594 | "origin": "http://1.2.3.4", |
| 5595 | "protocol": "http:", |
| 5596 | "username": "", |
| 5597 | "password": "", |
| 5598 | "host": "1.2.3.4", |
| 5599 | "hostname": "1.2.3.4", |
| 5600 | "port": "", |
| 5601 | "pathname": "/", |
| 5602 | "search": "", |
| 5603 | "hash": "" |
| 5604 | }, |
| 5605 | { |
| 5606 | "input": "http://192.168.257", |
| 5607 | "base": "http://other.com/", |
| 5608 | "href": "http://192.168.1.1/", |
| 5609 | "origin": "http://192.168.1.1", |
| 5610 | "protocol": "http:", |
| 5611 | "username": "", |
| 5612 | "password": "", |
| 5613 | "host": "192.168.1.1", |
| 5614 | "hostname": "192.168.1.1", |
| 5615 | "port": "", |
| 5616 | "pathname": "/", |
| 5617 | "search": "", |
| 5618 | "hash": "" |
| 5619 | }, |
| 5620 | { |
| 5621 | "input": "http://192.168.257.", |
| 5622 | "base": "http://other.com/", |
| 5623 | "href": "http://192.168.1.1/", |
| 5624 | "origin": "http://192.168.1.1", |
| 5625 | "protocol": "http:", |
| 5626 | "username": "", |
| 5627 | "password": "", |
| 5628 | "host": "192.168.1.1", |
| 5629 | "hostname": "192.168.1.1", |
| 5630 | "port": "", |
| 5631 | "pathname": "/", |
| 5632 | "search": "", |
| 5633 | "hash": "" |
| 5634 | }, |
| 5635 | { |
| 5636 | "input": "http://192.168.257.com", |
| 5637 | "base": "http://other.com/", |
| 5638 | "href": "http://192.168.257.com/", |
| 5639 | "origin": "http://192.168.257.com", |
| 5640 | "protocol": "http:", |
| 5641 | "username": "", |
| 5642 | "password": "", |
| 5643 | "host": "192.168.257.com", |
| 5644 | "hostname": "192.168.257.com", |
| 5645 | "port": "", |
| 5646 | "pathname": "/", |
| 5647 | "search": "", |
| 5648 | "hash": "" |
| 5649 | }, |
| 5650 | { |
| 5651 | "input": "http://256", |
| 5652 | "base": "http://other.com/", |
| 5653 | "href": "http://0.0.1.0/", |
| 5654 | "origin": "http://0.0.1.0", |
| 5655 | "protocol": "http:", |
| 5656 | "username": "", |
| 5657 | "password": "", |
| 5658 | "host": "0.0.1.0", |
| 5659 | "hostname": "0.0.1.0", |
| 5660 | "port": "", |
| 5661 | "pathname": "/", |
| 5662 | "search": "", |
| 5663 | "hash": "" |
| 5664 | }, |
| 5665 | { |
| 5666 | "input": "http://256.com", |
| 5667 | "base": "http://other.com/", |
| 5668 | "href": "http://256.com/", |
| 5669 | "origin": "http://256.com", |
| 5670 | "protocol": "http:", |
| 5671 | "username": "", |
| 5672 | "password": "", |
| 5673 | "host": "256.com", |
| 5674 | "hostname": "256.com", |
| 5675 | "port": "", |
| 5676 | "pathname": "/", |
| 5677 | "search": "", |
| 5678 | "hash": "" |
| 5679 | }, |
| 5680 | { |
| 5681 | "input": "http://999999999", |
| 5682 | "base": "http://other.com/", |
| 5683 | "href": "http://59.154.201.255/", |
| 5684 | "origin": "http://59.154.201.255", |
| 5685 | "protocol": "http:", |
| 5686 | "username": "", |
| 5687 | "password": "", |
| 5688 | "host": "59.154.201.255", |
| 5689 | "hostname": "59.154.201.255", |
| 5690 | "port": "", |
| 5691 | "pathname": "/", |
| 5692 | "search": "", |
| 5693 | "hash": "" |
| 5694 | }, |
| 5695 | { |
| 5696 | "input": "http://999999999.", |
| 5697 | "base": "http://other.com/", |
| 5698 | "href": "http://59.154.201.255/", |
| 5699 | "origin": "http://59.154.201.255", |
| 5700 | "protocol": "http:", |
| 5701 | "username": "", |
| 5702 | "password": "", |
| 5703 | "host": "59.154.201.255", |
| 5704 | "hostname": "59.154.201.255", |
| 5705 | "port": "", |
| 5706 | "pathname": "/", |
| 5707 | "search": "", |
| 5708 | "hash": "" |
| 5709 | }, |
| 5710 | { |
| 5711 | "input": "http://999999999.com", |
| 5712 | "base": "http://other.com/", |
| 5713 | "href": "http://999999999.com/", |
| 5714 | "origin": "http://999999999.com", |
| 5715 | "protocol": "http:", |
| 5716 | "username": "", |
| 5717 | "password": "", |
| 5718 | "host": "999999999.com", |
| 5719 | "hostname": "999999999.com", |
| 5720 | "port": "", |
| 5721 | "pathname": "/", |
| 5722 | "search": "", |
| 5723 | "hash": "" |
| 5724 | }, |
| 5725 | { |
| 5726 | "input": "http://10000000000", |
| 5727 | "base": "http://other.com/", |
| 5728 | "failure": true |
| 5729 | }, |
| 5730 | { |
| 5731 | "input": "http://10000000000.com", |
| 5732 | "base": "http://other.com/", |
| 5733 | "href": "http://10000000000.com/", |
| 5734 | "origin": "http://10000000000.com", |
| 5735 | "protocol": "http:", |
| 5736 | "username": "", |
| 5737 | "password": "", |
| 5738 | "host": "10000000000.com", |
| 5739 | "hostname": "10000000000.com", |
| 5740 | "port": "", |
| 5741 | "pathname": "/", |
| 5742 | "search": "", |
| 5743 | "hash": "" |
| 5744 | }, |
| 5745 | { |
| 5746 | "input": "http://4294967295", |
| 5747 | "base": "http://other.com/", |
| 5748 | "href": "http://255.255.255.255/", |
| 5749 | "origin": "http://255.255.255.255", |
| 5750 | "protocol": "http:", |
| 5751 | "username": "", |
| 5752 | "password": "", |
| 5753 | "host": "255.255.255.255", |
| 5754 | "hostname": "255.255.255.255", |
| 5755 | "port": "", |
| 5756 | "pathname": "/", |
| 5757 | "search": "", |
| 5758 | "hash": "" |
| 5759 | }, |
| 5760 | { |
| 5761 | "input": "http://4294967296", |
| 5762 | "base": "http://other.com/", |
| 5763 | "failure": true |
| 5764 | }, |
| 5765 | { |
| 5766 | "input": "http://0xffffffff", |
| 5767 | "base": "http://other.com/", |
| 5768 | "href": "http://255.255.255.255/", |
| 5769 | "origin": "http://255.255.255.255", |
| 5770 | "protocol": "http:", |
| 5771 | "username": "", |
| 5772 | "password": "", |
| 5773 | "host": "255.255.255.255", |
| 5774 | "hostname": "255.255.255.255", |
| 5775 | "port": "", |
| 5776 | "pathname": "/", |
| 5777 | "search": "", |
| 5778 | "hash": "" |
| 5779 | }, |
| 5780 | { |
| 5781 | "input": "http://0xffffffff1", |
| 5782 | "base": "http://other.com/", |
| 5783 | "failure": true |
| 5784 | }, |
| 5785 | { |
| 5786 | "input": "http://256.256.256.256", |
| 5787 | "base": "http://other.com/", |
| 5788 | "failure": true |
| 5789 | }, |
| 5790 | { |
| 5791 | "input": "https://0x.0x.0", |
| 5792 | "base": null, |
| 5793 | "href": "https://0.0.0.0/", |
| 5794 | "origin": "https://0.0.0.0", |
| 5795 | "protocol": "https:", |
| 5796 | "username": "", |
| 5797 | "password": "", |
| 5798 | "host": "0.0.0.0", |
| 5799 | "hostname": "0.0.0.0", |
| 5800 | "port": "", |
| 5801 | "pathname": "/", |
| 5802 | "search": "", |
| 5803 | "hash": "" |
| 5804 | }, |
| 5805 | "More IPv4 parsing (via https://github.com/jsdom/whatwg-url/issues/92)", |
| 5806 | { |
| 5807 | "input": "https://0x100000000/test", |
| 5808 | "base": null, |
| 5809 | "failure": true |
| 5810 | }, |
| 5811 | { |
| 5812 | "input": "https://256.0.0.1/test", |
| 5813 | "base": null, |
| 5814 | "failure": true |
| 5815 | }, |
| 5816 | "# file URLs containing percent-encoded Windows drive letters (shouldn't work)", |
| 5817 | { |
| 5818 | "input": "file:///C%3A/", |
| 5819 | "base": null, |
| 5820 | "href": "file:///C%3A/", |
| 5821 | "protocol": "file:", |
| 5822 | "username": "", |
| 5823 | "password": "", |
| 5824 | "host": "", |
| 5825 | "hostname": "", |
| 5826 | "port": "", |
| 5827 | "pathname": "/C%3A/", |
| 5828 | "search": "", |
| 5829 | "hash": "" |
| 5830 | }, |
| 5831 | { |
| 5832 | "input": "file:///C%7C/", |
| 5833 | "base": null, |
| 5834 | "href": "file:///C%7C/", |
| 5835 | "protocol": "file:", |
| 5836 | "username": "", |
| 5837 | "password": "", |
| 5838 | "host": "", |
| 5839 | "hostname": "", |
| 5840 | "port": "", |
| 5841 | "pathname": "/C%7C/", |
| 5842 | "search": "", |
| 5843 | "hash": "" |
| 5844 | }, |
| 5845 | { |
| 5846 | "input": "file://%43%3A", |
| 5847 | "base": null, |
| 5848 | "failure": true |
| 5849 | }, |
| 5850 | { |
| 5851 | "input": "file://%43%7C", |
| 5852 | "base": null, |
| 5853 | "failure": true |
| 5854 | }, |
| 5855 | { |
| 5856 | "input": "file://%43|", |
| 5857 | "base": null, |
| 5858 | "failure": true |
| 5859 | }, |
| 5860 | { |
| 5861 | "input": "file://C%7C", |
| 5862 | "base": null, |
| 5863 | "failure": true |
| 5864 | }, |
| 5865 | { |
| 5866 | "input": "file://%43%7C/", |
| 5867 | "base": null, |
| 5868 | "failure": true |
| 5869 | }, |
| 5870 | { |
| 5871 | "input": "https://%43%7C/", |
| 5872 | "base": null, |
| 5873 | "failure": true |
| 5874 | }, |
| 5875 | { |
| 5876 | "input": "asdf://%43|/", |
| 5877 | "base": null, |
| 5878 | "failure": true |
| 5879 | }, |
| 5880 | { |
| 5881 | "input": "asdf://%43%7C/", |
| 5882 | "base": null, |
| 5883 | "href": "asdf://%43%7C/", |
| 5884 | "origin": "null", |
| 5885 | "protocol": "asdf:", |
| 5886 | "username": "", |
| 5887 | "password": "", |
| 5888 | "host": "%43%7C", |
| 5889 | "hostname": "%43%7C", |
| 5890 | "port": "", |
| 5891 | "pathname": "/", |
| 5892 | "search": "", |
| 5893 | "hash": "" |
| 5894 | }, |
| 5895 | "# file URLs relative to other file URLs (via https://github.com/jsdom/whatwg-url/pull/60)", |
| 5896 | { |
| 5897 | "input": "pix/submit.gif", |
| 5898 | "base": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html", |
| 5899 | "href": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif", |
| 5900 | "protocol": "file:", |
| 5901 | "username": "", |
| 5902 | "password": "", |
| 5903 | "host": "", |
| 5904 | "hostname": "", |
| 5905 | "port": "", |
| 5906 | "pathname": "/C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif", |
| 5907 | "search": "", |
| 5908 | "hash": "" |
| 5909 | }, |
| 5910 | { |
| 5911 | "input": "..", |
| 5912 | "base": "file:///C:/", |
| 5913 | "href": "file:///C:/", |
| 5914 | "protocol": "file:", |
| 5915 | "username": "", |
| 5916 | "password": "", |
| 5917 | "host": "", |
| 5918 | "hostname": "", |
| 5919 | "port": "", |
| 5920 | "pathname": "/C:/", |
| 5921 | "search": "", |
| 5922 | "hash": "" |
| 5923 | }, |
| 5924 | { |
| 5925 | "input": "..", |
| 5926 | "base": "file:///", |
| 5927 | "href": "file:///", |
| 5928 | "protocol": "file:", |
| 5929 | "username": "", |
| 5930 | "password": "", |
| 5931 | "host": "", |
| 5932 | "hostname": "", |
| 5933 | "port": "", |
| 5934 | "pathname": "/", |
| 5935 | "search": "", |
| 5936 | "hash": "" |
| 5937 | }, |
| 5938 | "# More file URL tests by zcorpan and annevk", |
| 5939 | { |
| 5940 | "input": "/", |
| 5941 | "base": "file:///C:/a/b", |
| 5942 | "href": "file:///C:/", |
| 5943 | "protocol": "file:", |
| 5944 | "username": "", |
| 5945 | "password": "", |
| 5946 | "host": "", |
| 5947 | "hostname": "", |
| 5948 | "port": "", |
| 5949 | "pathname": "/C:/", |
| 5950 | "search": "", |
| 5951 | "hash": "" |
| 5952 | }, |
| 5953 | { |
| 5954 | "input": "/", |
| 5955 | "base": "file://h/C:/a/b", |
| 5956 | "href": "file://h/C:/", |
| 5957 | "protocol": "file:", |
| 5958 | "username": "", |
| 5959 | "password": "", |
| 5960 | "host": "h", |
| 5961 | "hostname": "h", |
| 5962 | "port": "", |
| 5963 | "pathname": "/C:/", |
| 5964 | "search": "", |
| 5965 | "hash": "" |
| 5966 | }, |
| 5967 | { |
| 5968 | "input": "/", |
| 5969 | "base": "file://h/a/b", |
| 5970 | "href": "file://h/", |
| 5971 | "protocol": "file:", |
| 5972 | "username": "", |
| 5973 | "password": "", |
| 5974 | "host": "h", |
| 5975 | "hostname": "h", |
| 5976 | "port": "", |
| 5977 | "pathname": "/", |
| 5978 | "search": "", |
| 5979 | "hash": "" |
| 5980 | }, |
| 5981 | { |
| 5982 | "input": "//d:", |
| 5983 | "base": "file:///C:/a/b", |
| 5984 | "href": "file:///d:", |
| 5985 | "protocol": "file:", |
| 5986 | "username": "", |
| 5987 | "password": "", |
| 5988 | "host": "", |
| 5989 | "hostname": "", |
| 5990 | "port": "", |
| 5991 | "pathname": "/d:", |
| 5992 | "search": "", |
| 5993 | "hash": "" |
| 5994 | }, |
| 5995 | { |
| 5996 | "input": "//d:/..", |
| 5997 | "base": "file:///C:/a/b", |
| 5998 | "href": "file:///d:/", |
| 5999 | "protocol": "file:", |
| 6000 | "username": "", |
| 6001 | "password": "", |
| 6002 | "host": "", |
| 6003 | "hostname": "", |
| 6004 | "port": "", |
| 6005 | "pathname": "/d:/", |
| 6006 | "search": "", |
| 6007 | "hash": "" |
| 6008 | }, |
| 6009 | { |
| 6010 | "input": "..", |
| 6011 | "base": "file:///ab:/", |
| 6012 | "href": "file:///", |
| 6013 | "protocol": "file:", |
| 6014 | "username": "", |
| 6015 | "password": "", |
| 6016 | "host": "", |
| 6017 | "hostname": "", |
| 6018 | "port": "", |
| 6019 | "pathname": "/", |
| 6020 | "search": "", |
| 6021 | "hash": "" |
| 6022 | }, |
| 6023 | { |
| 6024 | "input": "..", |
| 6025 | "base": "file:///1:/", |
| 6026 | "href": "file:///", |
| 6027 | "protocol": "file:", |
| 6028 | "username": "", |
| 6029 | "password": "", |
| 6030 | "host": "", |
| 6031 | "hostname": "", |
| 6032 | "port": "", |
| 6033 | "pathname": "/", |
| 6034 | "search": "", |
| 6035 | "hash": "" |
| 6036 | }, |
| 6037 | { |
| 6038 | "input": "", |
| 6039 | "base": "file:///test?test#test", |
| 6040 | "href": "file:///test?test", |
| 6041 | "protocol": "file:", |
| 6042 | "username": "", |
| 6043 | "password": "", |
| 6044 | "host": "", |
| 6045 | "hostname": "", |
| 6046 | "port": "", |
| 6047 | "pathname": "/test", |
| 6048 | "search": "?test", |
| 6049 | "hash": "" |
| 6050 | }, |
| 6051 | { |
| 6052 | "input": "file:", |
| 6053 | "base": "file:///test?test#test", |
| 6054 | "href": "file:///test?test", |
| 6055 | "protocol": "file:", |
| 6056 | "username": "", |
| 6057 | "password": "", |
| 6058 | "host": "", |
| 6059 | "hostname": "", |
| 6060 | "port": "", |
| 6061 | "pathname": "/test", |
| 6062 | "search": "?test", |
| 6063 | "hash": "" |
| 6064 | }, |
| 6065 | { |
| 6066 | "input": "?x", |
| 6067 | "base": "file:///test?test#test", |
| 6068 | "href": "file:///test?x", |
| 6069 | "protocol": "file:", |
| 6070 | "username": "", |
| 6071 | "password": "", |
| 6072 | "host": "", |
| 6073 | "hostname": "", |
| 6074 | "port": "", |
| 6075 | "pathname": "/test", |
| 6076 | "search": "?x", |
| 6077 | "hash": "" |
| 6078 | }, |
| 6079 | { |
| 6080 | "input": "file:?x", |
| 6081 | "base": "file:///test?test#test", |
| 6082 | "href": "file:///test?x", |
| 6083 | "protocol": "file:", |
| 6084 | "username": "", |
| 6085 | "password": "", |
| 6086 | "host": "", |
| 6087 | "hostname": "", |
| 6088 | "port": "", |
| 6089 | "pathname": "/test", |
| 6090 | "search": "?x", |
| 6091 | "hash": "" |
| 6092 | }, |
| 6093 | { |
| 6094 | "input": "#x", |
| 6095 | "base": "file:///test?test#test", |
| 6096 | "href": "file:///test?test#x", |
| 6097 | "protocol": "file:", |
| 6098 | "username": "", |
| 6099 | "password": "", |
| 6100 | "host": "", |
| 6101 | "hostname": "", |
| 6102 | "port": "", |
| 6103 | "pathname": "/test", |
| 6104 | "search": "?test", |
| 6105 | "hash": "#x" |
| 6106 | }, |
| 6107 | { |
| 6108 | "input": "file:#x", |
| 6109 | "base": "file:///test?test#test", |
| 6110 | "href": "file:///test?test#x", |
| 6111 | "protocol": "file:", |
| 6112 | "username": "", |
| 6113 | "password": "", |
| 6114 | "host": "", |
| 6115 | "hostname": "", |
| 6116 | "port": "", |
| 6117 | "pathname": "/test", |
| 6118 | "search": "?test", |
| 6119 | "hash": "#x" |
| 6120 | }, |
| 6121 | "# File URLs and many (back)slashes", |
| 6122 | { |
| 6123 | "input": "file:\\\\//", |
| 6124 | "base": null, |
| 6125 | "href": "file:////", |
| 6126 | "protocol": "file:", |
| 6127 | "username": "", |
| 6128 | "password": "", |
| 6129 | "host": "", |
| 6130 | "hostname": "", |
| 6131 | "port": "", |
| 6132 | "pathname": "//", |
| 6133 | "search": "", |
| 6134 | "hash": "" |
| 6135 | }, |
| 6136 | { |
| 6137 | "input": "file:\\\\\\\\", |
| 6138 | "base": null, |
| 6139 | "href": "file:////", |
| 6140 | "protocol": "file:", |
| 6141 | "username": "", |
| 6142 | "password": "", |
| 6143 | "host": "", |
| 6144 | "hostname": "", |
| 6145 | "port": "", |
| 6146 | "pathname": "//", |
| 6147 | "search": "", |
| 6148 | "hash": "" |
| 6149 | }, |
| 6150 | { |
| 6151 | "input": "file:\\\\\\\\?fox", |
| 6152 | "base": null, |
| 6153 | "href": "file:////?fox", |
| 6154 | "protocol": "file:", |
| 6155 | "username": "", |
| 6156 | "password": "", |
| 6157 | "host": "", |
| 6158 | "hostname": "", |
| 6159 | "port": "", |
| 6160 | "pathname": "//", |
| 6161 | "search": "?fox", |
| 6162 | "hash": "" |
| 6163 | }, |
| 6164 | { |
| 6165 | "input": "file:\\\\\\\\#guppy", |
| 6166 | "base": null, |
| 6167 | "href": "file:////#guppy", |
| 6168 | "protocol": "file:", |
| 6169 | "username": "", |
| 6170 | "password": "", |
| 6171 | "host": "", |
| 6172 | "hostname": "", |
| 6173 | "port": "", |
| 6174 | "pathname": "//", |
| 6175 | "search": "", |
| 6176 | "hash": "#guppy" |
| 6177 | }, |
| 6178 | { |
| 6179 | "input": "file://spider///", |
| 6180 | "base": null, |
| 6181 | "href": "file://spider///", |
| 6182 | "protocol": "file:", |
| 6183 | "username": "", |
| 6184 | "password": "", |
| 6185 | "host": "spider", |
| 6186 | "hostname": "spider", |
| 6187 | "port": "", |
| 6188 | "pathname": "///", |
| 6189 | "search": "", |
| 6190 | "hash": "" |
| 6191 | }, |
| 6192 | { |
| 6193 | "input": "file:\\\\localhost//", |
| 6194 | "base": null, |
| 6195 | "href": "file:////", |
| 6196 | "protocol": "file:", |
| 6197 | "username": "", |
| 6198 | "password": "", |
| 6199 | "host": "", |
| 6200 | "hostname": "", |
| 6201 | "port": "", |
| 6202 | "pathname": "//", |
| 6203 | "search": "", |
| 6204 | "hash": "" |
| 6205 | }, |
| 6206 | { |
| 6207 | "input": "file:///localhost//cat", |
| 6208 | "base": null, |
| 6209 | "href": "file:///localhost//cat", |
| 6210 | "protocol": "file:", |
| 6211 | "username": "", |
| 6212 | "password": "", |
| 6213 | "host": "", |
| 6214 | "hostname": "", |
| 6215 | "port": "", |
| 6216 | "pathname": "/localhost//cat", |
| 6217 | "search": "", |
| 6218 | "hash": "" |
| 6219 | }, |
| 6220 | { |
| 6221 | "input": "file://\\/localhost//cat", |
| 6222 | "base": null, |
| 6223 | "href": "file:////localhost//cat", |
| 6224 | "protocol": "file:", |
| 6225 | "username": "", |
| 6226 | "password": "", |
| 6227 | "host": "", |
| 6228 | "hostname": "", |
| 6229 | "port": "", |
| 6230 | "pathname": "//localhost//cat", |
| 6231 | "search": "", |
| 6232 | "hash": "" |
| 6233 | }, |
| 6234 | { |
| 6235 | "input": "file://localhost//a//../..//", |
| 6236 | "base": null, |
| 6237 | "href": "file://///", |
| 6238 | "protocol": "file:", |
| 6239 | "username": "", |
| 6240 | "password": "", |
| 6241 | "host": "", |
| 6242 | "hostname": "", |
| 6243 | "port": "", |
| 6244 | "pathname": "///", |
| 6245 | "search": "", |
| 6246 | "hash": "" |
| 6247 | }, |
| 6248 | { |
| 6249 | "input": "/////mouse", |
| 6250 | "base": "file:///elephant", |
| 6251 | "href": "file://///mouse", |
| 6252 | "protocol": "file:", |
| 6253 | "username": "", |
| 6254 | "password": "", |
| 6255 | "host": "", |
| 6256 | "hostname": "", |
| 6257 | "port": "", |
| 6258 | "pathname": "///mouse", |
| 6259 | "search": "", |
| 6260 | "hash": "" |
| 6261 | }, |
| 6262 | { |
| 6263 | "input": "\\//pig", |
| 6264 | "base": "file://lion/", |
| 6265 | "href": "file:///pig", |
| 6266 | "protocol": "file:", |
| 6267 | "username": "", |
| 6268 | "password": "", |
| 6269 | "host": "", |
| 6270 | "hostname": "", |
| 6271 | "port": "", |
| 6272 | "pathname": "/pig", |
| 6273 | "search": "", |
| 6274 | "hash": "" |
| 6275 | }, |
| 6276 | { |
| 6277 | "input": "\\/localhost//pig", |
| 6278 | "base": "file://lion/", |
| 6279 | "href": "file:////pig", |
| 6280 | "protocol": "file:", |
| 6281 | "username": "", |
| 6282 | "password": "", |
| 6283 | "host": "", |
| 6284 | "hostname": "", |
| 6285 | "port": "", |
| 6286 | "pathname": "//pig", |
| 6287 | "search": "", |
| 6288 | "hash": "" |
| 6289 | }, |
| 6290 | { |
| 6291 | "input": "//localhost//pig", |
| 6292 | "base": "file://lion/", |
| 6293 | "href": "file:////pig", |
| 6294 | "protocol": "file:", |
| 6295 | "username": "", |
| 6296 | "password": "", |
| 6297 | "host": "", |
| 6298 | "hostname": "", |
| 6299 | "port": "", |
| 6300 | "pathname": "//pig", |
| 6301 | "search": "", |
| 6302 | "hash": "" |
| 6303 | }, |
| 6304 | { |
| 6305 | "input": "/..//localhost//pig", |
| 6306 | "base": "file://lion/", |
| 6307 | "href": "file://lion//localhost//pig", |
| 6308 | "protocol": "file:", |
| 6309 | "username": "", |
| 6310 | "password": "", |
| 6311 | "host": "lion", |
| 6312 | "hostname": "lion", |
| 6313 | "port": "", |
| 6314 | "pathname": "//localhost//pig", |
| 6315 | "search": "", |
| 6316 | "hash": "" |
| 6317 | }, |
| 6318 | { |
| 6319 | "input": "file://", |
| 6320 | "base": "file://ape/", |
| 6321 | "href": "file:///", |
| 6322 | "protocol": "file:", |
| 6323 | "username": "", |
| 6324 | "password": "", |
| 6325 | "host": "", |
| 6326 | "hostname": "", |
| 6327 | "port": "", |
| 6328 | "pathname": "/", |
| 6329 | "search": "", |
| 6330 | "hash": "" |
| 6331 | }, |
| 6332 | "# File URLs with non-empty hosts", |
| 6333 | { |
| 6334 | "input": "/rooibos", |
| 6335 | "base": "file://tea/", |
| 6336 | "href": "file://tea/rooibos", |
| 6337 | "protocol": "file:", |
| 6338 | "username": "", |
| 6339 | "password": "", |
| 6340 | "host": "tea", |
| 6341 | "hostname": "tea", |
| 6342 | "port": "", |
| 6343 | "pathname": "/rooibos", |
| 6344 | "search": "", |
| 6345 | "hash": "" |
| 6346 | }, |
| 6347 | { |
| 6348 | "input": "/?chai", |
| 6349 | "base": "file://tea/", |
| 6350 | "href": "file://tea/?chai", |
| 6351 | "protocol": "file:", |
| 6352 | "username": "", |
| 6353 | "password": "", |
| 6354 | "host": "tea", |
| 6355 | "hostname": "tea", |
| 6356 | "port": "", |
| 6357 | "pathname": "/", |
| 6358 | "search": "?chai", |
| 6359 | "hash": "" |
| 6360 | }, |
| 6361 | "# Windows drive letter handling with the 'file:' base URL", |
| 6362 | { |
| 6363 | "input": "C|", |
| 6364 | "base": "file://host/dir/file", |
| 6365 | "href": "file://host/C:", |
| 6366 | "protocol": "file:", |
| 6367 | "username": "", |
| 6368 | "password": "", |
| 6369 | "host": "host", |
| 6370 | "hostname": "host", |
| 6371 | "port": "", |
| 6372 | "pathname": "/C:", |
| 6373 | "search": "", |
| 6374 | "hash": "" |
| 6375 | }, |
| 6376 | { |
| 6377 | "input": "C|", |
| 6378 | "base": "file://host/D:/dir1/dir2/file", |
| 6379 | "href": "file://host/C:", |
| 6380 | "protocol": "file:", |
| 6381 | "username": "", |
| 6382 | "password": "", |
| 6383 | "host": "host", |
| 6384 | "hostname": "host", |
| 6385 | "port": "", |
| 6386 | "pathname": "/C:", |
| 6387 | "search": "", |
| 6388 | "hash": "" |
| 6389 | }, |
| 6390 | { |
| 6391 | "input": "C|#", |
| 6392 | "base": "file://host/dir/file", |
| 6393 | "href": "file://host/C:#", |
| 6394 | "protocol": "file:", |
| 6395 | "username": "", |
| 6396 | "password": "", |
| 6397 | "host": "host", |
| 6398 | "hostname": "host", |
| 6399 | "port": "", |
| 6400 | "pathname": "/C:", |
| 6401 | "search": "", |
| 6402 | "hash": "" |
| 6403 | }, |
| 6404 | { |
| 6405 | "input": "C|?", |
| 6406 | "base": "file://host/dir/file", |
| 6407 | "href": "file://host/C:?", |
| 6408 | "protocol": "file:", |
| 6409 | "username": "", |
| 6410 | "password": "", |
| 6411 | "host": "host", |
| 6412 | "hostname": "host", |
| 6413 | "port": "", |
| 6414 | "pathname": "/C:", |
| 6415 | "search": "", |
| 6416 | "hash": "" |
| 6417 | }, |
| 6418 | { |
| 6419 | "input": "C|/", |
| 6420 | "base": "file://host/dir/file", |
| 6421 | "href": "file://host/C:/", |
| 6422 | "protocol": "file:", |
| 6423 | "username": "", |
| 6424 | "password": "", |
| 6425 | "host": "host", |
| 6426 | "hostname": "host", |
| 6427 | "port": "", |
| 6428 | "pathname": "/C:/", |
| 6429 | "search": "", |
| 6430 | "hash": "" |
| 6431 | }, |
| 6432 | { |
| 6433 | "input": "C|\n/", |
| 6434 | "base": "file://host/dir/file", |
| 6435 | "href": "file://host/C:/", |
| 6436 | "protocol": "file:", |
| 6437 | "username": "", |
| 6438 | "password": "", |
| 6439 | "host": "host", |
| 6440 | "hostname": "host", |
| 6441 | "port": "", |
| 6442 | "pathname": "/C:/", |
| 6443 | "search": "", |
| 6444 | "hash": "" |
| 6445 | }, |
| 6446 | { |
| 6447 | "input": "C|\\", |
| 6448 | "base": "file://host/dir/file", |
| 6449 | "href": "file://host/C:/", |
| 6450 | "protocol": "file:", |
| 6451 | "username": "", |
| 6452 | "password": "", |
| 6453 | "host": "host", |
| 6454 | "hostname": "host", |
| 6455 | "port": "", |
| 6456 | "pathname": "/C:/", |
| 6457 | "search": "", |
| 6458 | "hash": "" |
| 6459 | }, |
| 6460 | { |
| 6461 | "input": "C", |
| 6462 | "base": "file://host/dir/file", |
| 6463 | "href": "file://host/dir/C", |
| 6464 | "protocol": "file:", |
| 6465 | "username": "", |
| 6466 | "password": "", |
| 6467 | "host": "host", |
| 6468 | "hostname": "host", |
| 6469 | "port": "", |
| 6470 | "pathname": "/dir/C", |
| 6471 | "search": "", |
| 6472 | "hash": "" |
| 6473 | }, |
| 6474 | { |
| 6475 | "input": "C|a", |
| 6476 | "base": "file://host/dir/file", |
| 6477 | "href": "file://host/dir/C|a", |
| 6478 | "protocol": "file:", |
| 6479 | "username": "", |
| 6480 | "password": "", |
| 6481 | "host": "host", |
| 6482 | "hostname": "host", |
| 6483 | "port": "", |
| 6484 | "pathname": "/dir/C|a", |
| 6485 | "search": "", |
| 6486 | "hash": "" |
| 6487 | }, |
| 6488 | "# Windows drive letter quirk in the file slash state", |
| 6489 | { |
| 6490 | "input": "/c:/foo/bar", |
| 6491 | "base": "file:///c:/baz/qux", |
| 6492 | "href": "file:///c:/foo/bar", |
| 6493 | "protocol": "file:", |
| 6494 | "username": "", |
| 6495 | "password": "", |
| 6496 | "host": "", |
| 6497 | "hostname": "", |
| 6498 | "port": "", |
| 6499 | "pathname": "/c:/foo/bar", |
| 6500 | "search": "", |
| 6501 | "hash": "" |
| 6502 | }, |
| 6503 | { |
| 6504 | "input": "/c|/foo/bar", |
| 6505 | "base": "file:///c:/baz/qux", |
| 6506 | "href": "file:///c:/foo/bar", |
| 6507 | "protocol": "file:", |
| 6508 | "username": "", |
| 6509 | "password": "", |
| 6510 | "host": "", |
| 6511 | "hostname": "", |
| 6512 | "port": "", |
| 6513 | "pathname": "/c:/foo/bar", |
| 6514 | "search": "", |
| 6515 | "hash": "" |
| 6516 | }, |
| 6517 | { |
| 6518 | "input": "file:\\c:\\foo\\bar", |
| 6519 | "base": "file:///c:/baz/qux", |
| 6520 | "href": "file:///c:/foo/bar", |
| 6521 | "protocol": "file:", |
| 6522 | "username": "", |
| 6523 | "password": "", |
| 6524 | "host": "", |
| 6525 | "hostname": "", |
| 6526 | "port": "", |
| 6527 | "pathname": "/c:/foo/bar", |
| 6528 | "search": "", |
| 6529 | "hash": "" |
| 6530 | }, |
| 6531 | { |
| 6532 | "input": "/c:/foo/bar", |
| 6533 | "base": "file://host/path", |
| 6534 | "href": "file://host/c:/foo/bar", |
| 6535 | "protocol": "file:", |
| 6536 | "username": "", |
| 6537 | "password": "", |
| 6538 | "host": "host", |
| 6539 | "hostname": "host", |
| 6540 | "port": "", |
| 6541 | "pathname": "/c:/foo/bar", |
| 6542 | "search": "", |
| 6543 | "hash": "" |
| 6544 | }, |
| 6545 | "# Do not drop the host in the presence of a drive letter", |
| 6546 | { |
| 6547 | "input": "file://example.net/C:/", |
| 6548 | "base": null, |
| 6549 | "href": "file://example.net/C:/", |
| 6550 | "protocol": "file:", |
| 6551 | "username": "", |
| 6552 | "password": "", |
| 6553 | "host": "example.net", |
| 6554 | "hostname": "example.net", |
| 6555 | "port": "", |
| 6556 | "pathname": "/C:/", |
| 6557 | "search": "", |
| 6558 | "hash": "" |
| 6559 | }, |
| 6560 | { |
| 6561 | "input": "file://1.2.3.4/C:/", |
| 6562 | "base": null, |
| 6563 | "href": "file://1.2.3.4/C:/", |
| 6564 | "protocol": "file:", |
| 6565 | "username": "", |
| 6566 | "password": "", |
| 6567 | "host": "1.2.3.4", |
| 6568 | "hostname": "1.2.3.4", |
| 6569 | "port": "", |
| 6570 | "pathname": "/C:/", |
| 6571 | "search": "", |
| 6572 | "hash": "" |
| 6573 | }, |
| 6574 | { |
| 6575 | "input": "file://[1::8]/C:/", |
| 6576 | "base": null, |
| 6577 | "href": "file://[1::8]/C:/", |
| 6578 | "protocol": "file:", |
| 6579 | "username": "", |
| 6580 | "password": "", |
| 6581 | "host": "[1::8]", |
| 6582 | "hostname": "[1::8]", |
| 6583 | "port": "", |
| 6584 | "pathname": "/C:/", |
| 6585 | "search": "", |
| 6586 | "hash": "" |
| 6587 | }, |
| 6588 | "# Copy the host from the base URL in the following cases", |
| 6589 | { |
| 6590 | "input": "C|/", |
| 6591 | "base": "file://host/", |
| 6592 | "href": "file://host/C:/", |
| 6593 | "protocol": "file:", |
| 6594 | "username": "", |
| 6595 | "password": "", |
| 6596 | "host": "host", |
| 6597 | "hostname": "host", |
| 6598 | "port": "", |
| 6599 | "pathname": "/C:/", |
| 6600 | "search": "", |
| 6601 | "hash": "" |
| 6602 | }, |
| 6603 | { |
| 6604 | "input": "/C:/", |
| 6605 | "base": "file://host/", |
| 6606 | "href": "file://host/C:/", |
| 6607 | "protocol": "file:", |
| 6608 | "username": "", |
| 6609 | "password": "", |
| 6610 | "host": "host", |
| 6611 | "hostname": "host", |
| 6612 | "port": "", |
| 6613 | "pathname": "/C:/", |
| 6614 | "search": "", |
| 6615 | "hash": "" |
| 6616 | }, |
| 6617 | { |
| 6618 | "input": "file:C:/", |
| 6619 | "base": "file://host/", |
| 6620 | "href": "file://host/C:/", |
| 6621 | "protocol": "file:", |
| 6622 | "username": "", |
| 6623 | "password": "", |
| 6624 | "host": "host", |
| 6625 | "hostname": "host", |
| 6626 | "port": "", |
| 6627 | "pathname": "/C:/", |
| 6628 | "search": "", |
| 6629 | "hash": "" |
| 6630 | }, |
| 6631 | { |
| 6632 | "input": "file:/C:/", |
| 6633 | "base": "file://host/", |
| 6634 | "href": "file://host/C:/", |
| 6635 | "protocol": "file:", |
| 6636 | "username": "", |
| 6637 | "password": "", |
| 6638 | "host": "host", |
| 6639 | "hostname": "host", |
| 6640 | "port": "", |
| 6641 | "pathname": "/C:/", |
| 6642 | "search": "", |
| 6643 | "hash": "" |
| 6644 | }, |
| 6645 | "# Copy the empty host from the input in the following cases", |
| 6646 | { |
| 6647 | "input": "//C:/", |
| 6648 | "base": "file://host/", |
| 6649 | "href": "file:///C:/", |
| 6650 | "protocol": "file:", |
| 6651 | "username": "", |
| 6652 | "password": "", |
| 6653 | "host": "", |
| 6654 | "hostname": "", |
| 6655 | "port": "", |
| 6656 | "pathname": "/C:/", |
| 6657 | "search": "", |
| 6658 | "hash": "" |
| 6659 | }, |
| 6660 | { |
| 6661 | "input": "file://C:/", |
| 6662 | "base": "file://host/", |
| 6663 | "href": "file:///C:/", |
| 6664 | "protocol": "file:", |
| 6665 | "username": "", |
| 6666 | "password": "", |
| 6667 | "host": "", |
| 6668 | "hostname": "", |
| 6669 | "port": "", |
| 6670 | "pathname": "/C:/", |
| 6671 | "search": "", |
| 6672 | "hash": "" |
| 6673 | }, |
| 6674 | { |
| 6675 | "input": "///C:/", |
| 6676 | "base": "file://host/", |
| 6677 | "href": "file:///C:/", |
| 6678 | "protocol": "file:", |
| 6679 | "username": "", |
| 6680 | "password": "", |
| 6681 | "host": "", |
| 6682 | "hostname": "", |
| 6683 | "port": "", |
| 6684 | "pathname": "/C:/", |
| 6685 | "search": "", |
| 6686 | "hash": "" |
| 6687 | }, |
| 6688 | { |
| 6689 | "input": "file:///C:/", |
| 6690 | "base": "file://host/", |
| 6691 | "href": "file:///C:/", |
| 6692 | "protocol": "file:", |
| 6693 | "username": "", |
| 6694 | "password": "", |
| 6695 | "host": "", |
| 6696 | "hostname": "", |
| 6697 | "port": "", |
| 6698 | "pathname": "/C:/", |
| 6699 | "search": "", |
| 6700 | "hash": "" |
| 6701 | }, |
| 6702 | "# Windows drive letter quirk (no host)", |
| 6703 | { |
| 6704 | "input": "file:/C|/", |
| 6705 | "base": null, |
| 6706 | "href": "file:///C:/", |
| 6707 | "protocol": "file:", |
| 6708 | "username": "", |
| 6709 | "password": "", |
| 6710 | "host": "", |
| 6711 | "hostname": "", |
| 6712 | "port": "", |
| 6713 | "pathname": "/C:/", |
| 6714 | "search": "", |
| 6715 | "hash": "" |
| 6716 | }, |
| 6717 | { |
| 6718 | "input": "file://C|/", |
| 6719 | "base": null, |
| 6720 | "href": "file:///C:/", |
| 6721 | "protocol": "file:", |
| 6722 | "username": "", |
| 6723 | "password": "", |
| 6724 | "host": "", |
| 6725 | "hostname": "", |
| 6726 | "port": "", |
| 6727 | "pathname": "/C:/", |
| 6728 | "search": "", |
| 6729 | "hash": "" |
| 6730 | }, |
| 6731 | "# file URLs without base URL by Rimas Misevičius", |
| 6732 | { |
| 6733 | "input": "file:", |
| 6734 | "base": null, |
| 6735 | "href": "file:///", |
| 6736 | "protocol": "file:", |
| 6737 | "username": "", |
| 6738 | "password": "", |
| 6739 | "host": "", |
| 6740 | "hostname": "", |
| 6741 | "port": "", |
| 6742 | "pathname": "/", |
| 6743 | "search": "", |
| 6744 | "hash": "" |
| 6745 | }, |
| 6746 | { |
| 6747 | "input": "file:?q=v", |
| 6748 | "base": null, |
| 6749 | "href": "file:///?q=v", |
| 6750 | "protocol": "file:", |
| 6751 | "username": "", |
| 6752 | "password": "", |
| 6753 | "host": "", |
| 6754 | "hostname": "", |
| 6755 | "port": "", |
| 6756 | "pathname": "/", |
| 6757 | "search": "?q=v", |
| 6758 | "hash": "" |
| 6759 | }, |
| 6760 | { |
| 6761 | "input": "file:#frag", |
| 6762 | "base": null, |
| 6763 | "href": "file:///#frag", |
| 6764 | "protocol": "file:", |
| 6765 | "username": "", |
| 6766 | "password": "", |
| 6767 | "host": "", |
| 6768 | "hostname": "", |
| 6769 | "port": "", |
| 6770 | "pathname": "/", |
| 6771 | "search": "", |
| 6772 | "hash": "#frag" |
| 6773 | }, |
| 6774 | "# file: drive letter cases from https://crbug.com/1078698", |
| 6775 | { |
| 6776 | "input": "file:///Y:", |
| 6777 | "base": null, |
| 6778 | "href": "file:///Y:", |
| 6779 | "protocol": "file:", |
| 6780 | "username": "", |
| 6781 | "password": "", |
| 6782 | "host": "", |
| 6783 | "hostname": "", |
| 6784 | "port": "", |
| 6785 | "pathname": "/Y:", |
| 6786 | "search": "", |
| 6787 | "hash": "" |
| 6788 | }, |
| 6789 | { |
| 6790 | "input": "file:///Y:/", |
| 6791 | "base": null, |
| 6792 | "href": "file:///Y:/", |
| 6793 | "protocol": "file:", |
| 6794 | "username": "", |
| 6795 | "password": "", |
| 6796 | "host": "", |
| 6797 | "hostname": "", |
| 6798 | "port": "", |
| 6799 | "pathname": "/Y:/", |
| 6800 | "search": "", |
| 6801 | "hash": "" |
| 6802 | }, |
| 6803 | { |
| 6804 | "input": "file:///./Y", |
| 6805 | "base": null, |
| 6806 | "href": "file:///Y", |
| 6807 | "protocol": "file:", |
| 6808 | "username": "", |
| 6809 | "password": "", |
| 6810 | "host": "", |
| 6811 | "hostname": "", |
| 6812 | "port": "", |
| 6813 | "pathname": "/Y", |
| 6814 | "search": "", |
| 6815 | "hash": "" |
| 6816 | }, |
| 6817 | { |
| 6818 | "input": "file:///./Y:", |
| 6819 | "base": null, |
| 6820 | "href": "file:///Y:", |
| 6821 | "protocol": "file:", |
| 6822 | "username": "", |
| 6823 | "password": "", |
| 6824 | "host": "", |
| 6825 | "hostname": "", |
| 6826 | "port": "", |
| 6827 | "pathname": "/Y:", |
| 6828 | "search": "", |
| 6829 | "hash": "" |
| 6830 | }, |
| 6831 | { |
| 6832 | "input": "\\\\\\.\\Y:", |
| 6833 | "base": null, |
| 6834 | "failure": true, |
| 6835 | "relativeTo": "non-opaque-path-base" |
| 6836 | }, |
| 6837 | "# file: drive letter cases from https://crbug.com/1078698 but lowercased", |
| 6838 | { |
| 6839 | "input": "file:///y:", |
| 6840 | "base": null, |
| 6841 | "href": "file:///y:", |
| 6842 | "protocol": "file:", |
| 6843 | "username": "", |
| 6844 | "password": "", |
| 6845 | "host": "", |
| 6846 | "hostname": "", |
| 6847 | "port": "", |
| 6848 | "pathname": "/y:", |
| 6849 | "search": "", |
| 6850 | "hash": "" |
| 6851 | }, |
| 6852 | { |
| 6853 | "input": "file:///y:/", |
| 6854 | "base": null, |
| 6855 | "href": "file:///y:/", |
| 6856 | "protocol": "file:", |
| 6857 | "username": "", |
| 6858 | "password": "", |
| 6859 | "host": "", |
| 6860 | "hostname": "", |
| 6861 | "port": "", |
| 6862 | "pathname": "/y:/", |
| 6863 | "search": "", |
| 6864 | "hash": "" |
| 6865 | }, |
| 6866 | { |
| 6867 | "input": "file:///./y", |
| 6868 | "base": null, |
| 6869 | "href": "file:///y", |
| 6870 | "protocol": "file:", |
| 6871 | "username": "", |
| 6872 | "password": "", |
| 6873 | "host": "", |
| 6874 | "hostname": "", |
| 6875 | "port": "", |
| 6876 | "pathname": "/y", |
| 6877 | "search": "", |
| 6878 | "hash": "" |
| 6879 | }, |
| 6880 | { |
| 6881 | "input": "file:///./y:", |
| 6882 | "base": null, |
| 6883 | "href": "file:///y:", |
| 6884 | "protocol": "file:", |
| 6885 | "username": "", |
| 6886 | "password": "", |
| 6887 | "host": "", |
| 6888 | "hostname": "", |
| 6889 | "port": "", |
| 6890 | "pathname": "/y:", |
| 6891 | "search": "", |
| 6892 | "hash": "" |
| 6893 | }, |
| 6894 | { |
| 6895 | "input": "\\\\\\.\\y:", |
| 6896 | "base": null, |
| 6897 | "failure": true, |
| 6898 | "relativeTo": "non-opaque-path-base" |
| 6899 | }, |
| 6900 | "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)", |
| 6901 | { |
| 6902 | "input": "file://localhost//a//../..//foo", |
| 6903 | "base": null, |
| 6904 | "href": "file://///foo", |
| 6905 | "protocol": "file:", |
| 6906 | "username": "", |
| 6907 | "password": "", |
| 6908 | "host": "", |
| 6909 | "hostname": "", |
| 6910 | "port": "", |
| 6911 | "pathname": "///foo", |
| 6912 | "search": "", |
| 6913 | "hash": "" |
| 6914 | }, |
| 6915 | { |
| 6916 | "input": "file://localhost////foo", |
| 6917 | "base": null, |
| 6918 | "href": "file://////foo", |
| 6919 | "protocol": "file:", |
| 6920 | "username": "", |
| 6921 | "password": "", |
| 6922 | "host": "", |
| 6923 | "hostname": "", |
| 6924 | "port": "", |
| 6925 | "pathname": "////foo", |
| 6926 | "search": "", |
| 6927 | "hash": "" |
| 6928 | }, |
| 6929 | { |
| 6930 | "input": "file:////foo", |
| 6931 | "base": null, |
| 6932 | "href": "file:////foo", |
| 6933 | "protocol": "file:", |
| 6934 | "username": "", |
| 6935 | "password": "", |
| 6936 | "host": "", |
| 6937 | "hostname": "", |
| 6938 | "port": "", |
| 6939 | "pathname": "//foo", |
| 6940 | "search": "", |
| 6941 | "hash": "" |
| 6942 | }, |
| 6943 | { |
| 6944 | "input": "file:///one/two", |
| 6945 | "base": "file:///", |
| 6946 | "href": "file:///one/two", |
| 6947 | "protocol": "file:", |
| 6948 | "username": "", |
| 6949 | "password": "", |
| 6950 | "host": "", |
| 6951 | "hostname": "", |
| 6952 | "port": "", |
| 6953 | "pathname": "/one/two", |
| 6954 | "search": "", |
| 6955 | "hash": "" |
| 6956 | }, |
| 6957 | { |
| 6958 | "input": "file:////one/two", |
| 6959 | "base": "file:///", |
| 6960 | "href": "file:////one/two", |
| 6961 | "protocol": "file:", |
| 6962 | "username": "", |
| 6963 | "password": "", |
| 6964 | "host": "", |
| 6965 | "hostname": "", |
| 6966 | "port": "", |
| 6967 | "pathname": "//one/two", |
| 6968 | "search": "", |
| 6969 | "hash": "" |
| 6970 | }, |
| 6971 | { |
| 6972 | "input": "//one/two", |
| 6973 | "base": "file:///", |
| 6974 | "href": "file://one/two", |
| 6975 | "protocol": "file:", |
| 6976 | "username": "", |
| 6977 | "password": "", |
| 6978 | "host": "one", |
| 6979 | "hostname": "one", |
| 6980 | "port": "", |
| 6981 | "pathname": "/two", |
| 6982 | "search": "", |
| 6983 | "hash": "" |
| 6984 | }, |
| 6985 | { |
| 6986 | "input": "///one/two", |
| 6987 | "base": "file:///", |
| 6988 | "href": "file:///one/two", |
| 6989 | "protocol": "file:", |
| 6990 | "username": "", |
| 6991 | "password": "", |
| 6992 | "host": "", |
| 6993 | "hostname": "", |
| 6994 | "port": "", |
| 6995 | "pathname": "/one/two", |
| 6996 | "search": "", |
| 6997 | "hash": "" |
| 6998 | }, |
| 6999 | { |
| 7000 | "input": "////one/two", |
| 7001 | "base": "file:///", |
| 7002 | "href": "file:////one/two", |
| 7003 | "protocol": "file:", |
| 7004 | "username": "", |
| 7005 | "password": "", |
| 7006 | "host": "", |
| 7007 | "hostname": "", |
| 7008 | "port": "", |
| 7009 | "pathname": "//one/two", |
| 7010 | "search": "", |
| 7011 | "hash": "" |
| 7012 | }, |
| 7013 | { |
| 7014 | "input": "file:///.//", |
| 7015 | "base": "file:////", |
| 7016 | "href": "file:////", |
| 7017 | "protocol": "file:", |
| 7018 | "username": "", |
| 7019 | "password": "", |
| 7020 | "host": "", |
| 7021 | "hostname": "", |
| 7022 | "port": "", |
| 7023 | "pathname": "//", |
| 7024 | "search": "", |
| 7025 | "hash": "" |
| 7026 | }, |
| 7027 | "File URL tests for https://github.com/whatwg/url/issues/549", |
| 7028 | { |
| 7029 | "input": "file:.//p", |
| 7030 | "base": null, |
| 7031 | "href": "file:////p", |
| 7032 | "protocol": "file:", |
| 7033 | "username": "", |
| 7034 | "password": "", |
| 7035 | "host": "", |
| 7036 | "hostname": "", |
| 7037 | "port": "", |
| 7038 | "pathname": "//p", |
| 7039 | "search": "", |
| 7040 | "hash": "" |
| 7041 | }, |
| 7042 | { |
| 7043 | "input": "file:/.//p", |
| 7044 | "base": null, |
| 7045 | "href": "file:////p", |
| 7046 | "protocol": "file:", |
| 7047 | "username": "", |
| 7048 | "password": "", |
| 7049 | "host": "", |
| 7050 | "hostname": "", |
| 7051 | "port": "", |
| 7052 | "pathname": "//p", |
| 7053 | "search": "", |
| 7054 | "hash": "" |
| 7055 | }, |
| 7056 | "# IPv6 tests", |
| 7057 | { |
| 7058 | "input": "http://[1:0::]", |
| 7059 | "base": "http://example.net/", |
| 7060 | "href": "http://[1::]/", |
| 7061 | "origin": "http://[1::]", |
| 7062 | "protocol": "http:", |
| 7063 | "username": "", |
| 7064 | "password": "", |
| 7065 | "host": "[1::]", |
| 7066 | "hostname": "[1::]", |
| 7067 | "port": "", |
| 7068 | "pathname": "/", |
| 7069 | "search": "", |
| 7070 | "hash": "" |
| 7071 | }, |
| 7072 | { |
| 7073 | "input": "http://[0:1:2:3:4:5:6:7:8]", |
| 7074 | "base": "http://example.net/", |
| 7075 | "failure": true |
| 7076 | }, |
| 7077 | { |
| 7078 | "input": "https://[0::0::0]", |
| 7079 | "base": null, |
| 7080 | "failure": true |
| 7081 | }, |
| 7082 | { |
| 7083 | "input": "https://[0:.0]", |
| 7084 | "base": null, |
| 7085 | "failure": true |
| 7086 | }, |
| 7087 | { |
| 7088 | "input": "https://[0:0:]", |
| 7089 | "base": null, |
| 7090 | "failure": true |
| 7091 | }, |
| 7092 | { |
| 7093 | "input": "https://[0:1:2:3:4:5:6:7.0.0.0.1]", |
| 7094 | "base": null, |
| 7095 | "failure": true |
| 7096 | }, |
| 7097 | { |
| 7098 | "input": "https://[0:1.00.0.0.0]", |
| 7099 | "base": null, |
| 7100 | "failure": true |
| 7101 | }, |
| 7102 | { |
| 7103 | "input": "https://[0:1.290.0.0.0]", |
| 7104 | "base": null, |
| 7105 | "failure": true |
| 7106 | }, |
| 7107 | { |
| 7108 | "input": "https://[0:1.23.23]", |
| 7109 | "base": null, |
| 7110 | "failure": true |
| 7111 | }, |
| 7112 | "# Empty host", |
| 7113 | { |
| 7114 | "input": "http://?", |
| 7115 | "base": null, |
| 7116 | "failure": true |
| 7117 | }, |
| 7118 | { |
| 7119 | "input": "http://#", |
| 7120 | "base": null, |
| 7121 | "failure": true |
| 7122 | }, |
| 7123 | "Port overflow (2^32 + 81)", |
| 7124 | { |
| 7125 | "input": "http://f:4294967377/c", |
| 7126 | "base": "http://example.org/", |
| 7127 | "failure": true |
| 7128 | }, |
| 7129 | "Port overflow (2^64 + 81)", |
| 7130 | { |
| 7131 | "input": "http://f:18446744073709551697/c", |
| 7132 | "base": "http://example.org/", |
| 7133 | "failure": true |
| 7134 | }, |
| 7135 | "Port overflow (2^128 + 81)", |
| 7136 | { |
| 7137 | "input": "http://f:340282366920938463463374607431768211537/c", |
| 7138 | "base": "http://example.org/", |
| 7139 | "failure": true |
| 7140 | }, |
| 7141 | "# Non-special-URL path tests", |
| 7142 | { |
| 7143 | "input": "sc://ñ", |
| 7144 | "base": null, |
| 7145 | "href": "sc://%C3%B1", |
| 7146 | "origin": "null", |
| 7147 | "protocol": "sc:", |
| 7148 | "username": "", |
| 7149 | "password": "", |
| 7150 | "host": "%C3%B1", |
| 7151 | "hostname": "%C3%B1", |
| 7152 | "port": "", |
| 7153 | "pathname": "", |
| 7154 | "search": "", |
| 7155 | "hash": "" |
| 7156 | }, |
| 7157 | { |
| 7158 | "input": "sc://ñ?x", |
| 7159 | "base": null, |
| 7160 | "href": "sc://%C3%B1?x", |
| 7161 | "origin": "null", |
| 7162 | "protocol": "sc:", |
| 7163 | "username": "", |
| 7164 | "password": "", |
| 7165 | "host": "%C3%B1", |
| 7166 | "hostname": "%C3%B1", |
| 7167 | "port": "", |
| 7168 | "pathname": "", |
| 7169 | "search": "?x", |
| 7170 | "hash": "" |
| 7171 | }, |
| 7172 | { |
| 7173 | "input": "sc://ñ#x", |
| 7174 | "base": null, |
| 7175 | "href": "sc://%C3%B1#x", |
| 7176 | "origin": "null", |
| 7177 | "protocol": "sc:", |
| 7178 | "username": "", |
| 7179 | "password": "", |
| 7180 | "host": "%C3%B1", |
| 7181 | "hostname": "%C3%B1", |
| 7182 | "port": "", |
| 7183 | "pathname": "", |
| 7184 | "search": "", |
| 7185 | "hash": "#x" |
| 7186 | }, |
| 7187 | { |
| 7188 | "input": "#x", |
| 7189 | "base": "sc://ñ", |
| 7190 | "href": "sc://%C3%B1#x", |
| 7191 | "origin": "null", |
| 7192 | "protocol": "sc:", |
| 7193 | "username": "", |
| 7194 | "password": "", |
| 7195 | "host": "%C3%B1", |
| 7196 | "hostname": "%C3%B1", |
| 7197 | "port": "", |
| 7198 | "pathname": "", |
| 7199 | "search": "", |
| 7200 | "hash": "#x" |
| 7201 | }, |
| 7202 | { |
| 7203 | "input": "?x", |
| 7204 | "base": "sc://ñ", |
| 7205 | "href": "sc://%C3%B1?x", |
| 7206 | "origin": "null", |
| 7207 | "protocol": "sc:", |
| 7208 | "username": "", |
| 7209 | "password": "", |
| 7210 | "host": "%C3%B1", |
| 7211 | "hostname": "%C3%B1", |
| 7212 | "port": "", |
| 7213 | "pathname": "", |
| 7214 | "search": "?x", |
| 7215 | "hash": "" |
| 7216 | }, |
| 7217 | { |
| 7218 | "input": "sc://?", |
| 7219 | "base": null, |
| 7220 | "href": "sc://?", |
| 7221 | "protocol": "sc:", |
| 7222 | "username": "", |
| 7223 | "password": "", |
| 7224 | "host": "", |
| 7225 | "hostname": "", |
| 7226 | "port": "", |
| 7227 | "pathname": "", |
| 7228 | "search": "", |
| 7229 | "hash": "" |
| 7230 | }, |
| 7231 | { |
| 7232 | "input": "sc://#", |
| 7233 | "base": null, |
| 7234 | "href": "sc://#", |
| 7235 | "protocol": "sc:", |
| 7236 | "username": "", |
| 7237 | "password": "", |
| 7238 | "host": "", |
| 7239 | "hostname": "", |
| 7240 | "port": "", |
| 7241 | "pathname": "", |
| 7242 | "search": "", |
| 7243 | "hash": "" |
| 7244 | }, |
| 7245 | { |
| 7246 | "input": "///", |
| 7247 | "base": "sc://x/", |
| 7248 | "href": "sc:///", |
| 7249 | "protocol": "sc:", |
| 7250 | "username": "", |
| 7251 | "password": "", |
| 7252 | "host": "", |
| 7253 | "hostname": "", |
| 7254 | "port": "", |
| 7255 | "pathname": "/", |
| 7256 | "search": "", |
| 7257 | "hash": "" |
| 7258 | }, |
| 7259 | { |
| 7260 | "input": "////", |
| 7261 | "base": "sc://x/", |
| 7262 | "href": "sc:////", |
| 7263 | "protocol": "sc:", |
| 7264 | "username": "", |
| 7265 | "password": "", |
| 7266 | "host": "", |
| 7267 | "hostname": "", |
| 7268 | "port": "", |
| 7269 | "pathname": "//", |
| 7270 | "search": "", |
| 7271 | "hash": "" |
| 7272 | }, |
| 7273 | { |
| 7274 | "input": "////x/", |
| 7275 | "base": "sc://x/", |
| 7276 | "href": "sc:////x/", |
| 7277 | "protocol": "sc:", |
| 7278 | "username": "", |
| 7279 | "password": "", |
| 7280 | "host": "", |
| 7281 | "hostname": "", |
| 7282 | "port": "", |
| 7283 | "pathname": "//x/", |
| 7284 | "search": "", |
| 7285 | "hash": "" |
| 7286 | }, |
| 7287 | { |
| 7288 | "input": "tftp://foobar.com/someconfig;mode=netascii", |
| 7289 | "base": null, |
| 7290 | "href": "tftp://foobar.com/someconfig;mode=netascii", |
| 7291 | "origin": "null", |
| 7292 | "protocol": "tftp:", |
| 7293 | "username": "", |
| 7294 | "password": "", |
| 7295 | "host": "foobar.com", |
| 7296 | "hostname": "foobar.com", |
| 7297 | "port": "", |
| 7298 | "pathname": "/someconfig;mode=netascii", |
| 7299 | "search": "", |
| 7300 | "hash": "" |
| 7301 | }, |
| 7302 | { |
| 7303 | "input": "telnet://user:[email protected]:23/", |
| 7304 | "base": null, |
| 7305 | "href": "telnet://user:[email protected]:23/", |
| 7306 | "origin": "null", |
| 7307 | "protocol": "telnet:", |
| 7308 | "username": "user", |
| 7309 | "password": "pass", |
| 7310 | "host": "foobar.com:23", |
| 7311 | "hostname": "foobar.com", |
| 7312 | "port": "23", |
| 7313 | "pathname": "/", |
| 7314 | "search": "", |
| 7315 | "hash": "" |
| 7316 | }, |
| 7317 | { |
| 7318 | "input": "ut2004://10.10.10.10:7777/Index.ut2", |
| 7319 | "base": null, |
| 7320 | "href": "ut2004://10.10.10.10:7777/Index.ut2", |
| 7321 | "origin": "null", |
| 7322 | "protocol": "ut2004:", |
| 7323 | "username": "", |
| 7324 | "password": "", |
| 7325 | "host": "10.10.10.10:7777", |
| 7326 | "hostname": "10.10.10.10", |
| 7327 | "port": "7777", |
| 7328 | "pathname": "/Index.ut2", |
| 7329 | "search": "", |
| 7330 | "hash": "" |
| 7331 | }, |
| 7332 | { |
| 7333 | "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz", |
| 7334 | "base": null, |
| 7335 | "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz", |
| 7336 | "origin": "null", |
| 7337 | "protocol": "redis:", |
| 7338 | "username": "foo", |
| 7339 | "password": "bar", |
| 7340 | "host": "somehost:6379", |
| 7341 | "hostname": "somehost", |
| 7342 | "port": "6379", |
| 7343 | "pathname": "/0", |
| 7344 | "search": "?baz=bam&qux=baz", |
| 7345 | "hash": "" |
| 7346 | }, |
| 7347 | { |
| 7348 | "input": "rsync://foo@host:911/sup", |
| 7349 | "base": null, |
| 7350 | "href": "rsync://foo@host:911/sup", |
| 7351 | "origin": "null", |
| 7352 | "protocol": "rsync:", |
| 7353 | "username": "foo", |
| 7354 | "password": "", |
| 7355 | "host": "host:911", |
| 7356 | "hostname": "host", |
| 7357 | "port": "911", |
| 7358 | "pathname": "/sup", |
| 7359 | "search": "", |
| 7360 | "hash": "" |
| 7361 | }, |
| 7362 | { |
| 7363 | "input": "git://github.com/foo/bar.git", |
| 7364 | "base": null, |
| 7365 | "href": "git://github.com/foo/bar.git", |
| 7366 | "origin": "null", |
| 7367 | "protocol": "git:", |
| 7368 | "username": "", |
| 7369 | "password": "", |
| 7370 | "host": "github.com", |
| 7371 | "hostname": "github.com", |
| 7372 | "port": "", |
| 7373 | "pathname": "/foo/bar.git", |
| 7374 | "search": "", |
| 7375 | "hash": "" |
| 7376 | }, |
| 7377 | { |
| 7378 | "input": "irc://myserver.com:6999/channel?passwd", |
| 7379 | "base": null, |
| 7380 | "href": "irc://myserver.com:6999/channel?passwd", |
| 7381 | "origin": "null", |
| 7382 | "protocol": "irc:", |
| 7383 | "username": "", |
| 7384 | "password": "", |
| 7385 | "host": "myserver.com:6999", |
| 7386 | "hostname": "myserver.com", |
| 7387 | "port": "6999", |
| 7388 | "pathname": "/channel", |
| 7389 | "search": "?passwd", |
| 7390 | "hash": "" |
| 7391 | }, |
| 7392 | { |
| 7393 | "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT", |
| 7394 | "base": null, |
| 7395 | "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT", |
| 7396 | "origin": "null", |
| 7397 | "protocol": "dns:", |
| 7398 | "username": "", |
| 7399 | "password": "", |
| 7400 | "host": "fw.example.org:9999", |
| 7401 | "hostname": "fw.example.org", |
| 7402 | "port": "9999", |
| 7403 | "pathname": "/foo.bar.org", |
| 7404 | "search": "?type=TXT", |
| 7405 | "hash": "" |
| 7406 | }, |
| 7407 | { |
| 7408 | "input": "ldap://localhost:389/ou=People,o=JNDITutorial", |
| 7409 | "base": null, |
| 7410 | "href": "ldap://localhost:389/ou=People,o=JNDITutorial", |
| 7411 | "origin": "null", |
| 7412 | "protocol": "ldap:", |
| 7413 | "username": "", |
| 7414 | "password": "", |
| 7415 | "host": "localhost:389", |
| 7416 | "hostname": "localhost", |
| 7417 | "port": "389", |
| 7418 | "pathname": "/ou=People,o=JNDITutorial", |
| 7419 | "search": "", |
| 7420 | "hash": "" |
| 7421 | }, |
| 7422 | { |
| 7423 | "input": "git+https://github.com/foo/bar", |
| 7424 | "base": null, |
| 7425 | "href": "git+https://github.com/foo/bar", |
| 7426 | "origin": "null", |
| 7427 | "protocol": "git+https:", |
| 7428 | "username": "", |
| 7429 | "password": "", |
| 7430 | "host": "github.com", |
| 7431 | "hostname": "github.com", |
| 7432 | "port": "", |
| 7433 | "pathname": "/foo/bar", |
| 7434 | "search": "", |
| 7435 | "hash": "" |
| 7436 | }, |
| 7437 | { |
| 7438 | "input": "urn:ietf:rfc:2648", |
| 7439 | "base": null, |
| 7440 | "href": "urn:ietf:rfc:2648", |
| 7441 | "origin": "null", |
| 7442 | "protocol": "urn:", |
| 7443 | "username": "", |
| 7444 | "password": "", |
| 7445 | "host": "", |
| 7446 | "hostname": "", |
| 7447 | "port": "", |
| 7448 | "pathname": "ietf:rfc:2648", |
| 7449 | "search": "", |
| 7450 | "hash": "" |
| 7451 | }, |
| 7452 | { |
| 7453 | "input": "tag:[email protected],2001:foo/bar", |
| 7454 | "base": null, |
| 7455 | "href": "tag:[email protected],2001:foo/bar", |
| 7456 | "origin": "null", |
| 7457 | "protocol": "tag:", |
| 7458 | "username": "", |
| 7459 | "password": "", |
| 7460 | "host": "", |
| 7461 | "hostname": "", |
| 7462 | "port": "", |
| 7463 | "pathname": "[email protected],2001:foo/bar", |
| 7464 | "search": "", |
| 7465 | "hash": "" |
| 7466 | }, |
| 7467 | "Serialize /. in path", |
| 7468 | { |
| 7469 | "input": "non-spec:/.//", |
| 7470 | "base": null, |
| 7471 | "href": "non-spec:/.//", |
| 7472 | "protocol": "non-spec:", |
| 7473 | "username": "", |
| 7474 | "password": "", |
| 7475 | "host": "", |
| 7476 | "hostname": "", |
| 7477 | "port": "", |
| 7478 | "pathname": "//", |
| 7479 | "search": "", |
| 7480 | "hash": "" |
| 7481 | }, |
| 7482 | { |
| 7483 | "input": "non-spec:/..//", |
| 7484 | "base": null, |
| 7485 | "href": "non-spec:/.//", |
| 7486 | "protocol": "non-spec:", |
| 7487 | "username": "", |
| 7488 | "password": "", |
| 7489 | "host": "", |
| 7490 | "hostname": "", |
| 7491 | "port": "", |
| 7492 | "pathname": "//", |
| 7493 | "search": "", |
| 7494 | "hash": "" |
| 7495 | }, |
| 7496 | { |
| 7497 | "input": "non-spec:/a/..//", |
| 7498 | "base": null, |
| 7499 | "href": "non-spec:/.//", |
| 7500 | "protocol": "non-spec:", |
| 7501 | "username": "", |
| 7502 | "password": "", |
| 7503 | "host": "", |
| 7504 | "hostname": "", |
| 7505 | "port": "", |
| 7506 | "pathname": "//", |
| 7507 | "search": "", |
| 7508 | "hash": "" |
| 7509 | }, |
| 7510 | { |
| 7511 | "input": "non-spec:/.//path", |
| 7512 | "base": null, |
| 7513 | "href": "non-spec:/.//path", |
| 7514 | "protocol": "non-spec:", |
| 7515 | "username": "", |
| 7516 | "password": "", |
| 7517 | "host": "", |
| 7518 | "hostname": "", |
| 7519 | "port": "", |
| 7520 | "pathname": "//path", |
| 7521 | "search": "", |
| 7522 | "hash": "" |
| 7523 | }, |
| 7524 | { |
| 7525 | "input": "non-spec:/..//path", |
| 7526 | "base": null, |
| 7527 | "href": "non-spec:/.//path", |
| 7528 | "protocol": "non-spec:", |
| 7529 | "username": "", |
| 7530 | "password": "", |
| 7531 | "host": "", |
| 7532 | "hostname": "", |
| 7533 | "port": "", |
| 7534 | "pathname": "//path", |
| 7535 | "search": "", |
| 7536 | "hash": "" |
| 7537 | }, |
| 7538 | { |
| 7539 | "input": "non-spec:/a/..//path", |
| 7540 | "base": null, |
| 7541 | "href": "non-spec:/.//path", |
| 7542 | "protocol": "non-spec:", |
| 7543 | "username": "", |
| 7544 | "password": "", |
| 7545 | "host": "", |
| 7546 | "hostname": "", |
| 7547 | "port": "", |
| 7548 | "pathname": "//path", |
| 7549 | "search": "", |
| 7550 | "hash": "" |
| 7551 | }, |
| 7552 | { |
| 7553 | "input": "/.//path", |
| 7554 | "base": "non-spec:/p", |
| 7555 | "href": "non-spec:/.//path", |
| 7556 | "protocol": "non-spec:", |
| 7557 | "username": "", |
| 7558 | "password": "", |
| 7559 | "host": "", |
| 7560 | "hostname": "", |
| 7561 | "port": "", |
| 7562 | "pathname": "//path", |
| 7563 | "search": "", |
| 7564 | "hash": "" |
| 7565 | }, |
| 7566 | { |
| 7567 | "input": "/..//path", |
| 7568 | "base": "non-spec:/p", |
| 7569 | "href": "non-spec:/.//path", |
| 7570 | "protocol": "non-spec:", |
| 7571 | "username": "", |
| 7572 | "password": "", |
| 7573 | "host": "", |
| 7574 | "hostname": "", |
| 7575 | "port": "", |
| 7576 | "pathname": "//path", |
| 7577 | "search": "", |
| 7578 | "hash": "" |
| 7579 | }, |
| 7580 | { |
| 7581 | "input": "..//path", |
| 7582 | "base": "non-spec:/p", |
| 7583 | "href": "non-spec:/.//path", |
| 7584 | "protocol": "non-spec:", |
| 7585 | "username": "", |
| 7586 | "password": "", |
| 7587 | "host": "", |
| 7588 | "hostname": "", |
| 7589 | "port": "", |
| 7590 | "pathname": "//path", |
| 7591 | "search": "", |
| 7592 | "hash": "" |
| 7593 | }, |
| 7594 | { |
| 7595 | "input": "a/..//path", |
| 7596 | "base": "non-spec:/p", |
| 7597 | "href": "non-spec:/.//path", |
| 7598 | "protocol": "non-spec:", |
| 7599 | "username": "", |
| 7600 | "password": "", |
| 7601 | "host": "", |
| 7602 | "hostname": "", |
| 7603 | "port": "", |
| 7604 | "pathname": "//path", |
| 7605 | "search": "", |
| 7606 | "hash": "" |
| 7607 | }, |
| 7608 | { |
| 7609 | "input": "", |
| 7610 | "base": "non-spec:/..//p", |
| 7611 | "href": "non-spec:/.//p", |
| 7612 | "protocol": "non-spec:", |
| 7613 | "username": "", |
| 7614 | "password": "", |
| 7615 | "host": "", |
| 7616 | "hostname": "", |
| 7617 | "port": "", |
| 7618 | "pathname": "//p", |
| 7619 | "search": "", |
| 7620 | "hash": "" |
| 7621 | }, |
| 7622 | { |
| 7623 | "input": "path", |
| 7624 | "base": "non-spec:/..//p", |
| 7625 | "href": "non-spec:/.//path", |
| 7626 | "protocol": "non-spec:", |
| 7627 | "username": "", |
| 7628 | "password": "", |
| 7629 | "host": "", |
| 7630 | "hostname": "", |
| 7631 | "port": "", |
| 7632 | "pathname": "//path", |
| 7633 | "search": "", |
| 7634 | "hash": "" |
| 7635 | }, |
| 7636 | "Do not serialize /. in path", |
| 7637 | { |
| 7638 | "input": "../path", |
| 7639 | "base": "non-spec:/.//p", |
| 7640 | "href": "non-spec:/path", |
| 7641 | "protocol": "non-spec:", |
| 7642 | "username": "", |
| 7643 | "password": "", |
| 7644 | "host": "", |
| 7645 | "hostname": "", |
| 7646 | "port": "", |
| 7647 | "pathname": "/path", |
| 7648 | "search": "", |
| 7649 | "hash": "" |
| 7650 | }, |
| 7651 | "# percent encoded hosts in non-special-URLs", |
| 7652 | { |
| 7653 | "input": "non-special://%E2%80%A0/", |
| 7654 | "base": null, |
| 7655 | "href": "non-special://%E2%80%A0/", |
| 7656 | "protocol": "non-special:", |
| 7657 | "username": "", |
| 7658 | "password": "", |
| 7659 | "host": "%E2%80%A0", |
| 7660 | "hostname": "%E2%80%A0", |
| 7661 | "port": "", |
| 7662 | "pathname": "/", |
| 7663 | "search": "", |
| 7664 | "hash": "" |
| 7665 | }, |
| 7666 | { |
| 7667 | "input": "non-special://H%4fSt/path", |
| 7668 | "base": null, |
| 7669 | "href": "non-special://H%4fSt/path", |
| 7670 | "protocol": "non-special:", |
| 7671 | "username": "", |
| 7672 | "password": "", |
| 7673 | "host": "H%4fSt", |
| 7674 | "hostname": "H%4fSt", |
| 7675 | "port": "", |
| 7676 | "pathname": "/path", |
| 7677 | "search": "", |
| 7678 | "hash": "" |
| 7679 | }, |
| 7680 | "# IPv6 in non-special-URLs", |
| 7681 | { |
| 7682 | "input": "non-special://[1:2:0:0:5:0:0:0]/", |
| 7683 | "base": null, |
| 7684 | "href": "non-special://[1:2:0:0:5::]/", |
| 7685 | "protocol": "non-special:", |
| 7686 | "username": "", |
| 7687 | "password": "", |
| 7688 | "host": "[1:2:0:0:5::]", |
| 7689 | "hostname": "[1:2:0:0:5::]", |
| 7690 | "port": "", |
| 7691 | "pathname": "/", |
| 7692 | "search": "", |
| 7693 | "hash": "" |
| 7694 | }, |
| 7695 | { |
| 7696 | "input": "non-special://[1:2:0:0:0:0:0:3]/", |
| 7697 | "base": null, |
| 7698 | "href": "non-special://[1:2::3]/", |
| 7699 | "protocol": "non-special:", |
| 7700 | "username": "", |
| 7701 | "password": "", |
| 7702 | "host": "[1:2::3]", |
| 7703 | "hostname": "[1:2::3]", |
| 7704 | "port": "", |
| 7705 | "pathname": "/", |
| 7706 | "search": "", |
| 7707 | "hash": "" |
| 7708 | }, |
| 7709 | { |
| 7710 | "input": "non-special://[1:2::3]:80/", |
| 7711 | "base": null, |
| 7712 | "href": "non-special://[1:2::3]:80/", |
| 7713 | "protocol": "non-special:", |
| 7714 | "username": "", |
| 7715 | "password": "", |
| 7716 | "host": "[1:2::3]:80", |
| 7717 | "hostname": "[1:2::3]", |
| 7718 | "port": "80", |
| 7719 | "pathname": "/", |
| 7720 | "search": "", |
| 7721 | "hash": "" |
| 7722 | }, |
| 7723 | { |
| 7724 | "input": "non-special://[:80/", |
| 7725 | "base": null, |
| 7726 | "failure": true |
| 7727 | }, |
| 7728 | { |
| 7729 | "input": "blob:https://example.com:443/", |
| 7730 | "base": null, |
| 7731 | "href": "blob:https://example.com:443/", |
| 7732 | "origin": "https://example.com", |
| 7733 | "protocol": "blob:", |
| 7734 | "username": "", |
| 7735 | "password": "", |
| 7736 | "host": "", |
| 7737 | "hostname": "", |
| 7738 | "port": "", |
| 7739 | "pathname": "https://example.com:443/", |
| 7740 | "search": "", |
| 7741 | "hash": "" |
| 7742 | }, |
| 7743 | { |
| 7744 | "input": "blob:http://example.org:88/", |
| 7745 | "base": null, |
| 7746 | "href": "blob:http://example.org:88/", |
| 7747 | "origin": "http://example.org:88", |
| 7748 | "protocol": "blob:", |
| 7749 | "username": "", |
| 7750 | "password": "", |
| 7751 | "host": "", |
| 7752 | "hostname": "", |
| 7753 | "port": "", |
| 7754 | "pathname": "http://example.org:88/", |
| 7755 | "search": "", |
| 7756 | "hash": "" |
| 7757 | }, |
| 7758 | { |
| 7759 | "input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf", |
| 7760 | "base": null, |
| 7761 | "href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf", |
| 7762 | "origin": "null", |
| 7763 | "protocol": "blob:", |
| 7764 | "username": "", |
| 7765 | "password": "", |
| 7766 | "host": "", |
| 7767 | "hostname": "", |
| 7768 | "port": "", |
| 7769 | "pathname": "d3958f5c-0777-0845-9dcf-2cb28783acaf", |
| 7770 | "search": "", |
| 7771 | "hash": "" |
| 7772 | }, |
| 7773 | { |
| 7774 | "input": "blob:", |
| 7775 | "base": null, |
| 7776 | "href": "blob:", |
| 7777 | "origin": "null", |
| 7778 | "protocol": "blob:", |
| 7779 | "username": "", |
| 7780 | "password": "", |
| 7781 | "host": "", |
| 7782 | "hostname": "", |
| 7783 | "port": "", |
| 7784 | "pathname": "", |
| 7785 | "search": "", |
| 7786 | "hash": "" |
| 7787 | }, |
| 7788 | "blob: in blob:", |
| 7789 | { |
| 7790 | "input": "blob:blob:", |
| 7791 | "base": null, |
| 7792 | "href": "blob:blob:", |
| 7793 | "origin": "null", |
| 7794 | "protocol": "blob:", |
| 7795 | "username": "", |
| 7796 | "password": "", |
| 7797 | "host": "", |
| 7798 | "hostname": "", |
| 7799 | "port": "", |
| 7800 | "pathname": "blob:", |
| 7801 | "search": "", |
| 7802 | "hash": "" |
| 7803 | }, |
| 7804 | { |
| 7805 | "input": "blob:blob:https://example.org/", |
| 7806 | "base": null, |
| 7807 | "href": "blob:blob:https://example.org/", |
| 7808 | "origin": "null", |
| 7809 | "protocol": "blob:", |
| 7810 | "username": "", |
| 7811 | "password": "", |
| 7812 | "host": "", |
| 7813 | "hostname": "", |
| 7814 | "port": "", |
| 7815 | "pathname": "blob:https://example.org/", |
| 7816 | "search": "", |
| 7817 | "hash": "" |
| 7818 | }, |
| 7819 | "Non-http(s): in blob:", |
| 7820 | { |
| 7821 | "input": "blob:about:blank", |
| 7822 | "base": null, |
| 7823 | "href": "blob:about:blank", |
| 7824 | "origin": "null", |
| 7825 | "protocol": "blob:", |
| 7826 | "username": "", |
| 7827 | "password": "", |
| 7828 | "host": "", |
| 7829 | "hostname": "", |
| 7830 | "port": "", |
| 7831 | "pathname": "about:blank", |
| 7832 | "search": "", |
| 7833 | "hash": "" |
| 7834 | }, |
| 7835 | { |
| 7836 | "input": "blob:file://host/path", |
| 7837 | "base": null, |
| 7838 | "href": "blob:file://host/path", |
| 7839 | "origin": "null", |
| 7840 | "protocol": "blob:", |
| 7841 | "username": "", |
| 7842 | "password": "", |
| 7843 | "host": "", |
| 7844 | "hostname": "", |
| 7845 | "port": "", |
| 7846 | "pathname": "file://host/path", |
| 7847 | "search": "", |
| 7848 | "hash": "" |
| 7849 | }, |
| 7850 | { |
| 7851 | "input": "blob:ftp://host/path", |
| 7852 | "base": null, |
| 7853 | "href": "blob:ftp://host/path", |
| 7854 | "origin": "null", |
| 7855 | "protocol": "blob:", |
| 7856 | "username": "", |
| 7857 | "password": "", |
| 7858 | "host": "", |
| 7859 | "hostname": "", |
| 7860 | "port": "", |
| 7861 | "pathname": "ftp://host/path", |
| 7862 | "search": "", |
| 7863 | "hash": "" |
| 7864 | }, |
| 7865 | { |
| 7866 | "input": "blob:ws://example.org/", |
| 7867 | "base": null, |
| 7868 | "href": "blob:ws://example.org/", |
| 7869 | "origin": "null", |
| 7870 | "protocol": "blob:", |
| 7871 | "username": "", |
| 7872 | "password": "", |
| 7873 | "host": "", |
| 7874 | "hostname": "", |
| 7875 | "port": "", |
| 7876 | "pathname": "ws://example.org/", |
| 7877 | "search": "", |
| 7878 | "hash": "" |
| 7879 | }, |
| 7880 | { |
| 7881 | "input": "blob:wss://example.org/", |
| 7882 | "base": null, |
| 7883 | "href": "blob:wss://example.org/", |
| 7884 | "origin": "null", |
| 7885 | "protocol": "blob:", |
| 7886 | "username": "", |
| 7887 | "password": "", |
| 7888 | "host": "", |
| 7889 | "hostname": "", |
| 7890 | "port": "", |
| 7891 | "pathname": "wss://example.org/", |
| 7892 | "search": "", |
| 7893 | "hash": "" |
| 7894 | }, |
| 7895 | "Percent-encoded http: in blob:", |
| 7896 | { |
| 7897 | "input": "blob:http%3a//example.org/", |
| 7898 | "base": null, |
| 7899 | "href": "blob:http%3a//example.org/", |
| 7900 | "origin": "null", |
| 7901 | "protocol": "blob:", |
| 7902 | "username": "", |
| 7903 | "password": "", |
| 7904 | "host": "", |
| 7905 | "hostname": "", |
| 7906 | "port": "", |
| 7907 | "pathname": "http%3a//example.org/", |
| 7908 | "search": "", |
| 7909 | "hash": "" |
| 7910 | }, |
| 7911 | "Invalid IPv4 radix digits", |
| 7912 | { |
| 7913 | "input": "http://0x7f.0.0.0x7g", |
| 7914 | "base": null, |
| 7915 | "href": "http://0x7f.0.0.0x7g/", |
| 7916 | "protocol": "http:", |
| 7917 | "username": "", |
| 7918 | "password": "", |
| 7919 | "host": "0x7f.0.0.0x7g", |
| 7920 | "hostname": "0x7f.0.0.0x7g", |
| 7921 | "port": "", |
| 7922 | "pathname": "/", |
| 7923 | "search": "", |
| 7924 | "hash": "" |
| 7925 | }, |
| 7926 | { |
| 7927 | "input": "http://0X7F.0.0.0X7G", |
| 7928 | "base": null, |
| 7929 | "href": "http://0x7f.0.0.0x7g/", |
| 7930 | "protocol": "http:", |
| 7931 | "username": "", |
| 7932 | "password": "", |
| 7933 | "host": "0x7f.0.0.0x7g", |
| 7934 | "hostname": "0x7f.0.0.0x7g", |
| 7935 | "port": "", |
| 7936 | "pathname": "/", |
| 7937 | "search": "", |
| 7938 | "hash": "" |
| 7939 | }, |
| 7940 | "Invalid IPv4 portion of IPv6 address", |
| 7941 | { |
| 7942 | "input": "http://[::127.0.0.0.1]", |
| 7943 | "base": null, |
| 7944 | "failure": true |
| 7945 | }, |
| 7946 | "Uncompressed IPv6 addresses with 0", |
| 7947 | { |
| 7948 | "input": "http://[0:1:0:1:0:1:0:1]", |
| 7949 | "base": null, |
| 7950 | "href": "http://[0:1:0:1:0:1:0:1]/", |
| 7951 | "protocol": "http:", |
| 7952 | "username": "", |
| 7953 | "password": "", |
| 7954 | "host": "[0:1:0:1:0:1:0:1]", |
| 7955 | "hostname": "[0:1:0:1:0:1:0:1]", |
| 7956 | "port": "", |
| 7957 | "pathname": "/", |
| 7958 | "search": "", |
| 7959 | "hash": "" |
| 7960 | }, |
| 7961 | { |
| 7962 | "input": "http://[1:0:1:0:1:0:1:0]", |
| 7963 | "base": null, |
| 7964 | "href": "http://[1:0:1:0:1:0:1:0]/", |
| 7965 | "protocol": "http:", |
| 7966 | "username": "", |
| 7967 | "password": "", |
| 7968 | "host": "[1:0:1:0:1:0:1:0]", |
| 7969 | "hostname": "[1:0:1:0:1:0:1:0]", |
| 7970 | "port": "", |
| 7971 | "pathname": "/", |
| 7972 | "search": "", |
| 7973 | "hash": "" |
| 7974 | }, |
| 7975 | "Percent-encoded query and fragment", |
| 7976 | { |
| 7977 | "input": "http://example.org/test?\u0022", |
| 7978 | "base": null, |
| 7979 | "href": "http://example.org/test?%22", |
| 7980 | "protocol": "http:", |
| 7981 | "username": "", |
| 7982 | "password": "", |
| 7983 | "host": "example.org", |
| 7984 | "hostname": "example.org", |
| 7985 | "port": "", |
| 7986 | "pathname": "/test", |
| 7987 | "search": "?%22", |
| 7988 | "hash": "" |
| 7989 | }, |
| 7990 | { |
| 7991 | "input": "http://example.org/test?\u0023", |
| 7992 | "base": null, |
| 7993 | "href": "http://example.org/test?#", |
| 7994 | "protocol": "http:", |
| 7995 | "username": "", |
| 7996 | "password": "", |
| 7997 | "host": "example.org", |
| 7998 | "hostname": "example.org", |
| 7999 | "port": "", |
| 8000 | "pathname": "/test", |
| 8001 | "search": "", |
| 8002 | "hash": "" |
| 8003 | }, |
| 8004 | { |
| 8005 | "input": "http://example.org/test?\u003C", |
| 8006 | "base": null, |
| 8007 | "href": "http://example.org/test?%3C", |
| 8008 | "protocol": "http:", |
| 8009 | "username": "", |
| 8010 | "password": "", |
| 8011 | "host": "example.org", |
| 8012 | "hostname": "example.org", |
| 8013 | "port": "", |
| 8014 | "pathname": "/test", |
| 8015 | "search": "?%3C", |
| 8016 | "hash": "" |
| 8017 | }, |
| 8018 | { |
| 8019 | "input": "http://example.org/test?\u003E", |
| 8020 | "base": null, |
| 8021 | "href": "http://example.org/test?%3E", |
| 8022 | "protocol": "http:", |
| 8023 | "username": "", |
| 8024 | "password": "", |
| 8025 | "host": "example.org", |
| 8026 | "hostname": "example.org", |
| 8027 | "port": "", |
| 8028 | "pathname": "/test", |
| 8029 | "search": "?%3E", |
| 8030 | "hash": "" |
| 8031 | }, |
| 8032 | { |
| 8033 | "input": "http://example.org/test?\u2323", |
| 8034 | "base": null, |
| 8035 | "href": "http://example.org/test?%E2%8C%A3", |
| 8036 | "protocol": "http:", |
| 8037 | "username": "", |
| 8038 | "password": "", |
| 8039 | "host": "example.org", |
| 8040 | "hostname": "example.org", |
| 8041 | "port": "", |
| 8042 | "pathname": "/test", |
| 8043 | "search": "?%E2%8C%A3", |
| 8044 | "hash": "" |
| 8045 | }, |
| 8046 | { |
| 8047 | "input": "http://example.org/test?%23%23", |
| 8048 | "base": null, |
| 8049 | "href": "http://example.org/test?%23%23", |
| 8050 | "protocol": "http:", |
| 8051 | "username": "", |
| 8052 | "password": "", |
| 8053 | "host": "example.org", |
| 8054 | "hostname": "example.org", |
| 8055 | "port": "", |
| 8056 | "pathname": "/test", |
| 8057 | "search": "?%23%23", |
| 8058 | "hash": "" |
| 8059 | }, |
| 8060 | { |
| 8061 | "input": "http://example.org/test?%GH", |
| 8062 | "base": null, |
| 8063 | "href": "http://example.org/test?%GH", |
| 8064 | "protocol": "http:", |
| 8065 | "username": "", |
| 8066 | "password": "", |
| 8067 | "host": "example.org", |
| 8068 | "hostname": "example.org", |
| 8069 | "port": "", |
| 8070 | "pathname": "/test", |
| 8071 | "search": "?%GH", |
| 8072 | "hash": "" |
| 8073 | }, |
| 8074 | { |
| 8075 | "input": "http://example.org/test?a#%EF", |
| 8076 | "base": null, |
| 8077 | "href": "http://example.org/test?a#%EF", |
| 8078 | "protocol": "http:", |
| 8079 | "username": "", |
| 8080 | "password": "", |
| 8081 | "host": "example.org", |
| 8082 | "hostname": "example.org", |
| 8083 | "port": "", |
| 8084 | "pathname": "/test", |
| 8085 | "search": "?a", |
| 8086 | "hash": "#%EF" |
| 8087 | }, |
| 8088 | { |
| 8089 | "input": "http://example.org/test?a#%GH", |
| 8090 | "base": null, |
| 8091 | "href": "http://example.org/test?a#%GH", |
| 8092 | "protocol": "http:", |
| 8093 | "username": "", |
| 8094 | "password": "", |
| 8095 | "host": "example.org", |
| 8096 | "hostname": "example.org", |
| 8097 | "port": "", |
| 8098 | "pathname": "/test", |
| 8099 | "search": "?a", |
| 8100 | "hash": "#%GH" |
| 8101 | }, |
| 8102 | "URLs that require a non-about:blank base. (Also serve as invalid base tests.)", |
| 8103 | { |
| 8104 | "input": "a", |
| 8105 | "base": null, |
| 8106 | "failure": true, |
| 8107 | "relativeTo": "non-opaque-path-base" |
| 8108 | }, |
| 8109 | { |
| 8110 | "input": "a/", |
| 8111 | "base": null, |
| 8112 | "failure": true, |
| 8113 | "relativeTo": "non-opaque-path-base" |
| 8114 | }, |
| 8115 | { |
| 8116 | "input": "a//", |
| 8117 | "base": null, |
| 8118 | "failure": true, |
| 8119 | "relativeTo": "non-opaque-path-base" |
| 8120 | }, |
| 8121 | "Bases that don't fail to parse but fail to be bases", |
| 8122 | { |
| 8123 | "input": "test-a-colon.html", |
| 8124 | "base": "a:", |
| 8125 | "failure": true |
| 8126 | }, |
| 8127 | { |
| 8128 | "input": "test-a-colon-b.html", |
| 8129 | "base": "a:b", |
| 8130 | "failure": true |
| 8131 | }, |
| 8132 | "Other base URL tests, that must succeed", |
| 8133 | { |
| 8134 | "input": "test-a-colon-slash.html", |
| 8135 | "base": "a:/", |
| 8136 | "href": "a:/test-a-colon-slash.html", |
| 8137 | "protocol": "a:", |
| 8138 | "username": "", |
| 8139 | "password": "", |
| 8140 | "host": "", |
| 8141 | "hostname": "", |
| 8142 | "port": "", |
| 8143 | "pathname": "/test-a-colon-slash.html", |
| 8144 | "search": "", |
| 8145 | "hash": "" |
| 8146 | }, |
| 8147 | { |
| 8148 | "input": "test-a-colon-slash-slash.html", |
| 8149 | "base": "a://", |
| 8150 | "href": "a:///test-a-colon-slash-slash.html", |
| 8151 | "protocol": "a:", |
| 8152 | "username": "", |
| 8153 | "password": "", |
| 8154 | "host": "", |
| 8155 | "hostname": "", |
| 8156 | "port": "", |
| 8157 | "pathname": "/test-a-colon-slash-slash.html", |
| 8158 | "search": "", |
| 8159 | "hash": "" |
| 8160 | }, |
| 8161 | { |
| 8162 | "input": "test-a-colon-slash-b.html", |
| 8163 | "base": "a:/b", |
| 8164 | "href": "a:/test-a-colon-slash-b.html", |
| 8165 | "protocol": "a:", |
| 8166 | "username": "", |
| 8167 | "password": "", |
| 8168 | "host": "", |
| 8169 | "hostname": "", |
| 8170 | "port": "", |
| 8171 | "pathname": "/test-a-colon-slash-b.html", |
| 8172 | "search": "", |
| 8173 | "hash": "" |
| 8174 | }, |
| 8175 | { |
| 8176 | "input": "test-a-colon-slash-slash-b.html", |
| 8177 | "base": "a://b", |
| 8178 | "href": "a://b/test-a-colon-slash-slash-b.html", |
| 8179 | "protocol": "a:", |
| 8180 | "username": "", |
| 8181 | "password": "", |
| 8182 | "host": "b", |
| 8183 | "hostname": "b", |
| 8184 | "port": "", |
| 8185 | "pathname": "/test-a-colon-slash-slash-b.html", |
| 8186 | "search": "", |
| 8187 | "hash": "" |
| 8188 | }, |
| 8189 | "Null code point in fragment", |
| 8190 | { |
| 8191 | "input": "http://example.org/test?a#b\u0000c", |
| 8192 | "base": null, |
| 8193 | "href": "http://example.org/test?a#b%00c", |
| 8194 | "protocol": "http:", |
| 8195 | "username": "", |
| 8196 | "password": "", |
| 8197 | "host": "example.org", |
| 8198 | "hostname": "example.org", |
| 8199 | "port": "", |
| 8200 | "pathname": "/test", |
| 8201 | "search": "?a", |
| 8202 | "hash": "#b%00c" |
| 8203 | }, |
| 8204 | { |
| 8205 | "input": "non-spec://example.org/test?a#b\u0000c", |
| 8206 | "base": null, |
| 8207 | "href": "non-spec://example.org/test?a#b%00c", |
| 8208 | "protocol": "non-spec:", |
| 8209 | "username": "", |
| 8210 | "password": "", |
| 8211 | "host": "example.org", |
| 8212 | "hostname": "example.org", |
| 8213 | "port": "", |
| 8214 | "pathname": "/test", |
| 8215 | "search": "?a", |
| 8216 | "hash": "#b%00c" |
| 8217 | }, |
| 8218 | { |
| 8219 | "input": "non-spec:/test?a#b\u0000c", |
| 8220 | "base": null, |
| 8221 | "href": "non-spec:/test?a#b%00c", |
| 8222 | "protocol": "non-spec:", |
| 8223 | "username": "", |
| 8224 | "password": "", |
| 8225 | "host": "", |
| 8226 | "hostname": "", |
| 8227 | "port": "", |
| 8228 | "pathname": "/test", |
| 8229 | "search": "?a", |
| 8230 | "hash": "#b%00c" |
| 8231 | }, |
| 8232 | "First scheme char - not allowed: https://github.com/whatwg/url/issues/464", |
| 8233 | { |
| 8234 | "input": "10.0.0.7:8080/foo.html", |
| 8235 | "base": "file:///some/dir/bar.html", |
| 8236 | "href": "file:///some/dir/10.0.0.7:8080/foo.html", |
| 8237 | "protocol": "file:", |
| 8238 | "username": "", |
| 8239 | "password": "", |
| 8240 | "host": "", |
| 8241 | "hostname": "", |
| 8242 | "port": "", |
| 8243 | "pathname": "/some/dir/10.0.0.7:8080/foo.html", |
| 8244 | "search": "", |
| 8245 | "hash": "" |
| 8246 | }, |
| 8247 | "Subsequent scheme chars - not allowed", |
| 8248 | { |
| 8249 | "input": "a!@$*=/foo.html", |
| 8250 | "base": "file:///some/dir/bar.html", |
| 8251 | "href": "file:///some/dir/a!@$*=/foo.html", |
| 8252 | "protocol": "file:", |
| 8253 | "username": "", |
| 8254 | "password": "", |
| 8255 | "host": "", |
| 8256 | "hostname": "", |
| 8257 | "port": "", |
| 8258 | "pathname": "/some/dir/a!@$*=/foo.html", |
| 8259 | "search": "", |
| 8260 | "hash": "" |
| 8261 | }, |
| 8262 | "First and subsequent scheme chars - allowed", |
| 8263 | { |
| 8264 | "input": "a1234567890-+.:foo/bar", |
| 8265 | "base": "http://example.com/dir/file", |
| 8266 | "href": "a1234567890-+.:foo/bar", |
| 8267 | "protocol": "a1234567890-+.:", |
| 8268 | "username": "", |
| 8269 | "password": "", |
| 8270 | "host": "", |
| 8271 | "hostname": "", |
| 8272 | "port": "", |
| 8273 | "pathname": "foo/bar", |
| 8274 | "search": "", |
| 8275 | "hash": "" |
| 8276 | }, |
| 8277 | "IDNA ignored code points in file URLs hosts", |
| 8278 | { |
| 8279 | "input": "file://a\u00ADb/p", |
| 8280 | "base": null, |
| 8281 | "href": "file://ab/p", |
| 8282 | "protocol": "file:", |
| 8283 | "username": "", |
| 8284 | "password": "", |
| 8285 | "host": "ab", |
| 8286 | "hostname": "ab", |
| 8287 | "port": "", |
| 8288 | "pathname": "/p", |
| 8289 | "search": "", |
| 8290 | "hash": "" |
| 8291 | }, |
| 8292 | { |
| 8293 | "input": "file://a%C2%ADb/p", |
| 8294 | "base": null, |
| 8295 | "href": "file://ab/p", |
| 8296 | "protocol": "file:", |
| 8297 | "username": "", |
| 8298 | "password": "", |
| 8299 | "host": "ab", |
| 8300 | "hostname": "ab", |
| 8301 | "port": "", |
| 8302 | "pathname": "/p", |
| 8303 | "search": "", |
| 8304 | "hash": "" |
| 8305 | }, |
| 8306 | "IDNA hostnames which get mapped to 'localhost'", |
| 8307 | { |
| 8308 | "input": "file://loC𝐀𝐋𝐇𝐨𝐬𝐭/usr/bin", |
| 8309 | "base": null, |
| 8310 | "href": "file:///usr/bin", |
| 8311 | "protocol": "file:", |
| 8312 | "username": "", |
| 8313 | "password": "", |
| 8314 | "host": "", |
| 8315 | "hostname": "", |
| 8316 | "port": "", |
| 8317 | "pathname": "/usr/bin", |
| 8318 | "search": "", |
| 8319 | "hash": "" |
| 8320 | }, |
| 8321 | "Empty host after the domain to ASCII", |
| 8322 | { |
| 8323 | "input": "file://\u00ad/p", |
| 8324 | "base": null, |
| 8325 | "failure": true |
| 8326 | }, |
| 8327 | { |
| 8328 | "input": "file://%C2%AD/p", |
| 8329 | "base": null, |
| 8330 | "failure": true |
| 8331 | }, |
| 8332 | { |
| 8333 | "input": "file://xn--/p", |
| 8334 | "base": null, |
| 8335 | "failure": true |
| 8336 | }, |
| 8337 | "https://bugzilla.mozilla.org/show_bug.cgi?id=1647058", |
| 8338 | { |
| 8339 | "input": "#link", |
| 8340 | "base": "https://example.org/##link", |
| 8341 | "href": "https://example.org/#link", |
| 8342 | "protocol": "https:", |
| 8343 | "username": "", |
| 8344 | "password": "", |
| 8345 | "host": "example.org", |
| 8346 | "hostname": "example.org", |
| 8347 | "port": "", |
| 8348 | "pathname": "/", |
| 8349 | "search": "", |
| 8350 | "hash": "#link" |
| 8351 | }, |
| 8352 | "UTF-8 percent-encode of C0 control percent-encode set and supersets", |
| 8353 | { |
| 8354 | "input": "non-special:cannot-be-a-base-url-\u0000\u0001\u001F\u001E\u007E\u007F\u0080", |
| 8355 | "base": null, |
| 8356 | "hash": "", |
| 8357 | "host": "", |
| 8358 | "hostname": "", |
| 8359 | "href": "non-special:cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80", |
| 8360 | "origin": "null", |
| 8361 | "password": "", |
| 8362 | "pathname": "cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80", |
| 8363 | "port": "", |
| 8364 | "protocol": "non-special:", |
| 8365 | "search": "", |
| 8366 | "username": "" |
| 8367 | }, |
| 8368 | { |
| 8369 | "input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment", |
| 8370 | "base": null, |
| 8371 | "hash": "#fragment%3C%7Ffragment", |
| 8372 | "host": "www.example.com", |
| 8373 | "hostname": "www.example.com", |
| 8374 | "href": "https://www.example.com/path%7B%7Fpath.html?query%27%7F=query#fragment%3C%7Ffragment", |
| 8375 | "origin": "https://www.example.com", |
| 8376 | "password": "", |
| 8377 | "pathname": "/path%7B%7Fpath.html", |
| 8378 | "port": "", |
| 8379 | "protocol": "https:", |
| 8380 | "search": "?query%27%7F=query", |
| 8381 | "username": "" |
| 8382 | }, |
| 8383 | { |
| 8384 | "input": "https://user:pass[\u007F@foo/bar", |
| 8385 | "base": "http://example.org", |
| 8386 | "hash": "", |
| 8387 | "host": "foo", |
| 8388 | "hostname": "foo", |
| 8389 | "href": "https://user:pass%5B%7F@foo/bar", |
| 8390 | "origin": "https://foo", |
| 8391 | "password": "pass%5B%7F", |
| 8392 | "pathname": "/bar", |
| 8393 | "port": "", |
| 8394 | "protocol": "https:", |
| 8395 | "search": "", |
| 8396 | "username": "user" |
| 8397 | }, |
| 8398 | "Tests for the distinct percent-encode sets", |
| 8399 | { |
| 8400 | "input": "foo:// !\"$%&'()*+,-.;<=>@[\\]^_`{|}~@host/", |
| 8401 | "base": null, |
| 8402 | "hash": "", |
| 8403 | "host": "host", |
| 8404 | "hostname": "host", |
| 8405 | "href": "foo://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/", |
| 8406 | "origin": "null", |
| 8407 | "password": "", |
| 8408 | "pathname": "/", |
| 8409 | "port":"", |
| 8410 | "protocol": "foo:", |
| 8411 | "search": "", |
| 8412 | "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~" |
| 8413 | }, |
| 8414 | { |
| 8415 | "input": "wss:// !\"$%&'()*+,-.;<=>@[]^_`{|}~@host/", |
| 8416 | "base": null, |
| 8417 | "hash": "", |
| 8418 | "host": "host", |
| 8419 | "hostname": "host", |
| 8420 | "href": "wss://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/", |
| 8421 | "origin": "wss://host", |
| 8422 | "password": "", |
| 8423 | "pathname": "/", |
| 8424 | "port":"", |
| 8425 | "protocol": "wss:", |
| 8426 | "search": "", |
| 8427 | "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~" |
| 8428 | }, |
| 8429 | { |
| 8430 | "input": "foo://joe: !\"$%&'()*+,-.:;<=>@[\\]^_`{|}~@host/", |
| 8431 | "base": null, |
| 8432 | "hash": "", |
| 8433 | "host": "host", |
| 8434 | "hostname": "host", |
| 8435 | "href": "foo://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/", |
| 8436 | "origin": "null", |
| 8437 | "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~", |
| 8438 | "pathname": "/", |
| 8439 | "port":"", |
| 8440 | "protocol": "foo:", |
| 8441 | "search": "", |
| 8442 | "username": "joe" |
| 8443 | }, |
| 8444 | { |
| 8445 | "input": "wss://joe: !\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/", |
| 8446 | "base": null, |
| 8447 | "hash": "", |
| 8448 | "host": "host", |
| 8449 | "hostname": "host", |
| 8450 | "href": "wss://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/", |
| 8451 | "origin": "wss://host", |
| 8452 | "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~", |
| 8453 | "pathname": "/", |
| 8454 | "port":"", |
| 8455 | "protocol": "wss:", |
| 8456 | "search": "", |
| 8457 | "username": "joe" |
| 8458 | }, |
| 8459 | { |
| 8460 | "input": "foo://!\"$%&'()*+,-.;=_`{}~/", |
| 8461 | "base": null, |
| 8462 | "hash": "", |
| 8463 | "host": "!\"$%&'()*+,-.;=_`{}~", |
| 8464 | "hostname": "!\"$%&'()*+,-.;=_`{}~", |
| 8465 | "href":"foo://!\"$%&'()*+,-.;=_`{}~/", |
| 8466 | "origin": "null", |
| 8467 | "password": "", |
| 8468 | "pathname": "/", |
| 8469 | "port":"", |
| 8470 | "protocol": "foo:", |
| 8471 | "search": "", |
| 8472 | "username": "" |
| 8473 | }, |
| 8474 | { |
| 8475 | "input": "wss://!\"$&'()*+,-.;=_`{}~/", |
| 8476 | "base": null, |
| 8477 | "hash": "", |
| 8478 | "host": "!\"$&'()*+,-.;=_`{}~", |
| 8479 | "hostname": "!\"$&'()*+,-.;=_`{}~", |
| 8480 | "href":"wss://!\"$&'()*+,-.;=_`{}~/", |
| 8481 | "origin": "wss://!\"$&'()*+,-.;=_`{}~", |
| 8482 | "password": "", |
| 8483 | "pathname": "/", |
| 8484 | "port":"", |
| 8485 | "protocol": "wss:", |
| 8486 | "search": "", |
| 8487 | "username": "" |
| 8488 | }, |
| 8489 | { |
| 8490 | "input": "foo://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~", |
| 8491 | "base": null, |
| 8492 | "hash": "", |
| 8493 | "host": "host", |
| 8494 | "hostname": "host", |
| 8495 | "href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~", |
| 8496 | "origin": "null", |
| 8497 | "password": "", |
| 8498 | "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~", |
| 8499 | "port":"", |
| 8500 | "protocol": "foo:", |
| 8501 | "search": "", |
| 8502 | "username": "" |
| 8503 | }, |
| 8504 | { |
| 8505 | "input": "wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~", |
| 8506 | "base": null, |
| 8507 | "hash": "", |
| 8508 | "host": "host", |
| 8509 | "hostname": "host", |
| 8510 | "href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~", |
| 8511 | "origin": "wss://host", |
| 8512 | "password": "", |
| 8513 | "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~", |
| 8514 | "port":"", |
| 8515 | "protocol": "wss:", |
| 8516 | "search": "", |
| 8517 | "username": "" |
| 8518 | }, |
| 8519 | { |
| 8520 | "input": "foo://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~", |
| 8521 | "base": null, |
| 8522 | "hash": "", |
| 8523 | "host": "host", |
| 8524 | "hostname": "host", |
| 8525 | "href": "foo://host/dir/?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~", |
| 8526 | "origin": "null", |
| 8527 | "password": "", |
| 8528 | "pathname": "/dir/", |
| 8529 | "port":"", |
| 8530 | "protocol": "foo:", |
| 8531 | "search": "?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~", |
| 8532 | "username": "" |
| 8533 | }, |
| 8534 | { |
| 8535 | "input": "wss://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~", |
| 8536 | "base": null, |
| 8537 | "hash": "", |
| 8538 | "host": "host", |
| 8539 | "hostname": "host", |
| 8540 | "href": "wss://host/dir/?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~", |
| 8541 | "origin": "wss://host", |
| 8542 | "password": "", |
| 8543 | "pathname": "/dir/", |
| 8544 | "port":"", |
| 8545 | "protocol": "wss:", |
| 8546 | "search": "?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~", |
| 8547 | "username": "" |
| 8548 | }, |
| 8549 | { |
| 8550 | "input": "foo://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", |
| 8551 | "base": null, |
| 8552 | "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~", |
| 8553 | "host": "host", |
| 8554 | "hostname": "host", |
| 8555 | "href": "foo://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~", |
| 8556 | "origin": "null", |
| 8557 | "password": "", |
| 8558 | "pathname": "/dir/", |
| 8559 | "port":"", |
| 8560 | "protocol": "foo:", |
| 8561 | "search": "", |
| 8562 | "username": "" |
| 8563 | }, |
| 8564 | { |
| 8565 | "input": "wss://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", |
| 8566 | "base": null, |
| 8567 | "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~", |
| 8568 | "host": "host", |
| 8569 | "hostname": "host", |
| 8570 | "href": "wss://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~", |
| 8571 | "origin": "wss://host", |
| 8572 | "password": "", |
| 8573 | "pathname": "/dir/", |
| 8574 | "port":"", |
| 8575 | "protocol": "wss:", |
| 8576 | "search": "", |
| 8577 | "username": "" |
| 8578 | }, |
| 8579 | "Ensure that input schemes are not ignored when resolving non-special URLs", |
| 8580 | { |
| 8581 | "input": "abc:rootless", |
| 8582 | "base": "abc://host/path", |
| 8583 | "hash": "", |
| 8584 | "host": "", |
| 8585 | "hostname": "", |
| 8586 | "href":"abc:rootless", |
| 8587 | "password": "", |
| 8588 | "pathname": "rootless", |
| 8589 | "port":"", |
| 8590 | "protocol": "abc:", |
| 8591 | "search": "", |
| 8592 | "username": "" |
| 8593 | }, |
| 8594 | { |
| 8595 | "input": "abc:rootless", |
| 8596 | "base": "abc:/path", |
| 8597 | "hash": "", |
| 8598 | "host": "", |
| 8599 | "hostname": "", |
| 8600 | "href":"abc:rootless", |
| 8601 | "password": "", |
| 8602 | "pathname": "rootless", |
| 8603 | "port":"", |
| 8604 | "protocol": "abc:", |
| 8605 | "search": "", |
| 8606 | "username": "" |
| 8607 | }, |
| 8608 | { |
| 8609 | "input": "abc:rootless", |
| 8610 | "base": "abc:path", |
| 8611 | "hash": "", |
| 8612 | "host": "", |
| 8613 | "hostname": "", |
| 8614 | "href":"abc:rootless", |
| 8615 | "password": "", |
| 8616 | "pathname": "rootless", |
| 8617 | "port":"", |
| 8618 | "protocol": "abc:", |
| 8619 | "search": "", |
| 8620 | "username": "" |
| 8621 | }, |
| 8622 | { |
| 8623 | "input": "abc:/rooted", |
| 8624 | "base": "abc://host/path", |
| 8625 | "hash": "", |
| 8626 | "host": "", |
| 8627 | "hostname": "", |
| 8628 | "href":"abc:/rooted", |
| 8629 | "password": "", |
| 8630 | "pathname": "/rooted", |
| 8631 | "port":"", |
| 8632 | "protocol": "abc:", |
| 8633 | "search": "", |
| 8634 | "username": "" |
| 8635 | }, |
| 8636 | "Empty query and fragment with blank should throw an error", |
| 8637 | { |
| 8638 | "input": "#", |
| 8639 | "base": null, |
| 8640 | "failure": true, |
| 8641 | "relativeTo": "any-base" |
| 8642 | }, |
| 8643 | { |
| 8644 | "input": "?", |
| 8645 | "base": null, |
| 8646 | "failure": true, |
| 8647 | "relativeTo": "non-opaque-path-base" |
| 8648 | }, |
| 8649 | "Last component looks like a number, but not valid IPv4", |
| 8650 | { |
| 8651 | "input": "http://1.2.3.4.5", |
| 8652 | "base": "http://other.com/", |
| 8653 | "failure": true |
| 8654 | }, |
| 8655 | { |
| 8656 | "input": "http://1.2.3.4.5.", |
| 8657 | "base": "http://other.com/", |
| 8658 | "failure": true |
| 8659 | }, |
| 8660 | { |
| 8661 | "input": "http://0..0x300/", |
| 8662 | "base": null, |
| 8663 | "failure": true |
| 8664 | }, |
| 8665 | { |
| 8666 | "input": "http://0..0x300./", |
| 8667 | "base": null, |
| 8668 | "failure": true |
| 8669 | }, |
| 8670 | { |
| 8671 | "input": "http://256.256.256.256.256", |
| 8672 | "base": "http://other.com/", |
| 8673 | "failure": true |
| 8674 | }, |
| 8675 | { |
| 8676 | "input": "http://256.256.256.256.256.", |
| 8677 | "base": "http://other.com/", |
| 8678 | "failure": true |
| 8679 | }, |
| 8680 | { |
| 8681 | "input": "http://1.2.3.08", |
| 8682 | "base": null, |
| 8683 | "failure": true |
| 8684 | }, |
| 8685 | { |
| 8686 | "input": "http://1.2.3.08.", |
| 8687 | "base": null, |
| 8688 | "failure": true |
| 8689 | }, |
| 8690 | { |
| 8691 | "input": "http://1.2.3.09", |
| 8692 | "base": null, |
| 8693 | "failure": true |
| 8694 | }, |
| 8695 | { |
| 8696 | "input": "http://09.2.3.4", |
| 8697 | "base": null, |
| 8698 | "failure": true |
| 8699 | }, |
| 8700 | { |
| 8701 | "input": "http://09.2.3.4.", |
| 8702 | "base": null, |
| 8703 | "failure": true |
| 8704 | }, |
| 8705 | { |
| 8706 | "input": "http://01.2.3.4.5", |
| 8707 | "base": null, |
| 8708 | "failure": true |
| 8709 | }, |
| 8710 | { |
| 8711 | "input": "http://01.2.3.4.5.", |
| 8712 | "base": null, |
| 8713 | "failure": true |
| 8714 | }, |
| 8715 | { |
| 8716 | "input": "http://0x100.2.3.4", |
| 8717 | "base": null, |
| 8718 | "failure": true |
| 8719 | }, |
| 8720 | { |
| 8721 | "input": "http://0x100.2.3.4.", |
| 8722 | "base": null, |
| 8723 | "failure": true |
| 8724 | }, |
| 8725 | { |
| 8726 | "input": "http://0x1.2.3.4.5", |
| 8727 | "base": null, |
| 8728 | "failure": true |
| 8729 | }, |
| 8730 | { |
| 8731 | "input": "http://0x1.2.3.4.5.", |
| 8732 | "base": null, |
| 8733 | "failure": true |
| 8734 | }, |
| 8735 | { |
| 8736 | "input": "http://foo.1.2.3.4", |
| 8737 | "base": null, |
| 8738 | "failure": true |
| 8739 | }, |
| 8740 | { |
| 8741 | "input": "http://foo.1.2.3.4.", |
| 8742 | "base": null, |
| 8743 | "failure": true |
| 8744 | }, |
| 8745 | { |
| 8746 | "input": "http://foo.2.3.4", |
| 8747 | "base": null, |
| 8748 | "failure": true |
| 8749 | }, |
| 8750 | { |
| 8751 | "input": "http://foo.2.3.4.", |
| 8752 | "base": null, |
| 8753 | "failure": true |
| 8754 | }, |
| 8755 | { |
| 8756 | "input": "http://foo.09", |
| 8757 | "base": null, |
| 8758 | "failure": true |
| 8759 | }, |
| 8760 | { |
| 8761 | "input": "http://foo.09.", |
| 8762 | "base": null, |
| 8763 | "failure": true |
| 8764 | }, |
| 8765 | { |
| 8766 | "input": "http://foo.0x4", |
| 8767 | "base": null, |
| 8768 | "failure": true |
| 8769 | }, |
| 8770 | { |
| 8771 | "input": "http://foo.0x4.", |
| 8772 | "base": null, |
| 8773 | "failure": true |
| 8774 | }, |
| 8775 | { |
| 8776 | "input": "http://foo.09..", |
| 8777 | "base": null, |
| 8778 | "hash": "", |
| 8779 | "host": "foo.09..", |
| 8780 | "hostname": "foo.09..", |
| 8781 | "href":"http://foo.09../", |
| 8782 | "password": "", |
| 8783 | "pathname": "/", |
| 8784 | "port":"", |
| 8785 | "protocol": "http:", |
| 8786 | "search": "", |
| 8787 | "username": "" |
| 8788 | }, |
| 8789 | { |
| 8790 | "input": "http://0999999999999999999/", |
| 8791 | "base": null, |
| 8792 | "failure": true |
| 8793 | }, |
| 8794 | { |
| 8795 | "input": "http://foo.0x", |
| 8796 | "base": null, |
| 8797 | "failure": true |
| 8798 | }, |
| 8799 | { |
| 8800 | "input": "http://foo.0XFfFfFfFfFfFfFfFfFfAcE123", |
| 8801 | "base": null, |
| 8802 | "failure": true |
| 8803 | }, |
| 8804 | { |
| 8805 | "input": "http://💩.123/", |
| 8806 | "base": null, |
| 8807 | "failure": true |
| 8808 | }, |
| 8809 | "U+0000 and U+FFFF in various places", |
| 8810 | { |
| 8811 | "input": "https://\u0000y", |
| 8812 | "base": null, |
| 8813 | "failure": true |
| 8814 | }, |
| 8815 | { |
| 8816 | "input": "https://x/\u0000y", |
| 8817 | "base": null, |
| 8818 | "hash": "", |
| 8819 | "host": "x", |
| 8820 | "hostname": "x", |
| 8821 | "href": "https://x/%00y", |
| 8822 | "password": "", |
| 8823 | "pathname": "/%00y", |
| 8824 | "port": "", |
| 8825 | "protocol": "https:", |
| 8826 | "search": "", |
| 8827 | "username": "" |
| 8828 | }, |
| 8829 | { |
| 8830 | "input": "https://x/?\u0000y", |
| 8831 | "base": null, |
| 8832 | "hash": "", |
| 8833 | "host": "x", |
| 8834 | "hostname": "x", |
| 8835 | "href": "https://x/?%00y", |
| 8836 | "password": "", |
| 8837 | "pathname": "/", |
| 8838 | "port": "", |
| 8839 | "protocol": "https:", |
| 8840 | "search": "?%00y", |
| 8841 | "username": "" |
| 8842 | }, |
| 8843 | { |
| 8844 | "input": "https://x/?#\u0000y", |
| 8845 | "base": null, |
| 8846 | "hash": "#%00y", |
| 8847 | "host": "x", |
| 8848 | "hostname": "x", |
| 8849 | "href": "https://x/?#%00y", |
| 8850 | "password": "", |
| 8851 | "pathname": "/", |
| 8852 | "port": "", |
| 8853 | "protocol": "https:", |
| 8854 | "search": "", |
| 8855 | "username": "" |
| 8856 | }, |
| 8857 | { |
| 8858 | "input": "https://\uFFFFy", |
| 8859 | "base": null, |
| 8860 | "failure": true |
| 8861 | }, |
| 8862 | { |
| 8863 | "input": "https://x/\uFFFFy", |
| 8864 | "base": null, |
| 8865 | "hash": "", |
| 8866 | "host": "x", |
| 8867 | "hostname": "x", |
| 8868 | "href": "https://x/%EF%BF%BFy", |
| 8869 | "password": "", |
| 8870 | "pathname": "/%EF%BF%BFy", |
| 8871 | "port": "", |
| 8872 | "protocol": "https:", |
| 8873 | "search": "", |
| 8874 | "username": "" |
| 8875 | }, |
| 8876 | { |
| 8877 | "input": "https://x/?\uFFFFy", |
| 8878 | "base": null, |
| 8879 | "hash": "", |
| 8880 | "host": "x", |
| 8881 | "hostname": "x", |
| 8882 | "href": "https://x/?%EF%BF%BFy", |
| 8883 | "password": "", |
| 8884 | "pathname": "/", |
| 8885 | "port": "", |
| 8886 | "protocol": "https:", |
| 8887 | "search": "?%EF%BF%BFy", |
| 8888 | "username": "" |
| 8889 | }, |
| 8890 | { |
| 8891 | "input": "https://x/?#\uFFFFy", |
| 8892 | "base": null, |
| 8893 | "hash": "#%EF%BF%BFy", |
| 8894 | "host": "x", |
| 8895 | "hostname": "x", |
| 8896 | "href": "https://x/?#%EF%BF%BFy", |
| 8897 | "password": "", |
| 8898 | "pathname": "/", |
| 8899 | "port": "", |
| 8900 | "protocol": "https:", |
| 8901 | "search": "", |
| 8902 | "username": "" |
| 8903 | }, |
| 8904 | { |
| 8905 | "input": "non-special:\u0000y", |
| 8906 | "base": null, |
| 8907 | "hash": "", |
| 8908 | "host": "", |
| 8909 | "hostname": "", |
| 8910 | "href": "non-special:%00y", |
| 8911 | "password": "", |
| 8912 | "pathname": "%00y", |
| 8913 | "port": "", |
| 8914 | "protocol": "non-special:", |
| 8915 | "search": "", |
| 8916 | "username": "" |
| 8917 | }, |
| 8918 | { |
| 8919 | "input": "non-special:x/\u0000y", |
| 8920 | "base": null, |
| 8921 | "hash": "", |
| 8922 | "host": "", |
| 8923 | "hostname": "", |
| 8924 | "href": "non-special:x/%00y", |
| 8925 | "password": "", |
| 8926 | "pathname": "x/%00y", |
| 8927 | "port": "", |
| 8928 | "protocol": "non-special:", |
| 8929 | "search": "", |
| 8930 | "username": "" |
| 8931 | }, |
| 8932 | { |
| 8933 | "input": "non-special:x/?\u0000y", |
| 8934 | "base": null, |
| 8935 | "hash": "", |
| 8936 | "host": "", |
| 8937 | "hostname": "", |
| 8938 | "href": "non-special:x/?%00y", |
| 8939 | "password": "", |
| 8940 | "pathname": "x/", |
| 8941 | "port": "", |
| 8942 | "protocol": "non-special:", |
| 8943 | "search": "?%00y", |
| 8944 | "username": "" |
| 8945 | }, |
| 8946 | { |
| 8947 | "input": "non-special:x/?#\u0000y", |
| 8948 | "base": null, |
| 8949 | "hash": "#%00y", |
| 8950 | "host": "", |
| 8951 | "hostname": "", |
| 8952 | "href": "non-special:x/?#%00y", |
| 8953 | "password": "", |
| 8954 | "pathname": "x/", |
| 8955 | "port": "", |
| 8956 | "protocol": "non-special:", |
| 8957 | "search": "", |
| 8958 | "username": "" |
| 8959 | }, |
| 8960 | { |
| 8961 | "input": "non-special:\uFFFFy", |
| 8962 | "base": null, |
| 8963 | "hash": "", |
| 8964 | "host": "", |
| 8965 | "hostname": "", |
| 8966 | "href": "non-special:%EF%BF%BFy", |
| 8967 | "password": "", |
| 8968 | "pathname": "%EF%BF%BFy", |
| 8969 | "port": "", |
| 8970 | "protocol": "non-special:", |
| 8971 | "search": "", |
| 8972 | "username": "" |
| 8973 | }, |
| 8974 | { |
| 8975 | "input": "non-special:x/\uFFFFy", |
| 8976 | "base": null, |
| 8977 | "hash": "", |
| 8978 | "host": "", |
| 8979 | "hostname": "", |
| 8980 | "href": "non-special:x/%EF%BF%BFy", |
| 8981 | "password": "", |
| 8982 | "pathname": "x/%EF%BF%BFy", |
| 8983 | "port": "", |
| 8984 | "protocol": "non-special:", |
| 8985 | "search": "", |
| 8986 | "username": "" |
| 8987 | }, |
| 8988 | { |
| 8989 | "input": "non-special:x/?\uFFFFy", |
| 8990 | "base": null, |
| 8991 | "hash": "", |
| 8992 | "host": "", |
| 8993 | "hostname": "", |
| 8994 | "href": "non-special:x/?%EF%BF%BFy", |
| 8995 | "password": "", |
| 8996 | "pathname": "x/", |
| 8997 | "port": "", |
| 8998 | "protocol": "non-special:", |
| 8999 | "search": "?%EF%BF%BFy", |
| 9000 | "username": "" |
| 9001 | }, |
| 9002 | { |
| 9003 | "input": "non-special:x/?#\uFFFFy", |
| 9004 | "base": null, |
| 9005 | "hash": "#%EF%BF%BFy", |
| 9006 | "host": "", |
| 9007 | "hostname": "", |
| 9008 | "href": "non-special:x/?#%EF%BF%BFy", |
| 9009 | "password": "", |
| 9010 | "pathname": "x/", |
| 9011 | "port": "", |
| 9012 | "protocol": "non-special:", |
| 9013 | "search": "", |
| 9014 | "username": "" |
| 9015 | }, |
| 9016 | { |
| 9017 | "input": "", |
| 9018 | "base": null, |
| 9019 | "failure": true, |
| 9020 | "relativeTo": "non-opaque-path-base" |
| 9021 | }, |
| 9022 | { |
| 9023 | "input": "https://example.com/\"quoted\"", |
| 9024 | "base": null, |
| 9025 | "hash": "", |
| 9026 | "host": "example.com", |
| 9027 | "hostname": "example.com", |
| 9028 | "href": "https://example.com/%22quoted%22", |
| 9029 | "origin": "https://example.com", |
| 9030 | "password": "", |
| 9031 | "pathname": "/%22quoted%22", |
| 9032 | "port": "", |
| 9033 | "protocol": "https:", |
| 9034 | "search": "", |
| 9035 | "username": "" |
| 9036 | }, |
| 9037 | { |
| 9038 | "input": "https://a%C2%ADb/", |
| 9039 | "base": null, |
| 9040 | "hash": "", |
| 9041 | "host": "ab", |
| 9042 | "hostname": "ab", |
| 9043 | "href": "https://ab/", |
| 9044 | "origin": "https://ab", |
| 9045 | "password": "", |
| 9046 | "pathname": "/", |
| 9047 | "port": "", |
| 9048 | "protocol": "https:", |
| 9049 | "search": "", |
| 9050 | "username": "" |
| 9051 | }, |
| 9052 | { |
| 9053 | "comment": "Empty host after domain to ASCII", |
| 9054 | "input": "https://\u00AD/", |
| 9055 | "base": null, |
| 9056 | "failure": true |
| 9057 | }, |
| 9058 | { |
| 9059 | "input": "https://%C2%AD/", |
| 9060 | "base": null, |
| 9061 | "failure": true |
| 9062 | }, |
| 9063 | { |
| 9064 | "input": "https://xn--/", |
| 9065 | "base": null, |
| 9066 | "failure": true |
| 9067 | }, |
| 9068 | "Non-special schemes that some implementations might incorrectly treat as special", |
| 9069 | { |
| 9070 | "input": "data://example.com:8080/pathname?search#hash", |
| 9071 | "base": null, |
| 9072 | "href": "data://example.com:8080/pathname?search#hash", |
| 9073 | "origin": "null", |
| 9074 | "protocol": "data:", |
| 9075 | "username": "", |
| 9076 | "password": "", |
| 9077 | "host": "example.com:8080", |
| 9078 | "hostname": "example.com", |
| 9079 | "port": "8080", |
| 9080 | "pathname": "/pathname", |
| 9081 | "search": "?search", |
| 9082 | "hash": "#hash" |
| 9083 | }, |
| 9084 | { |
| 9085 | "input": "data:///test", |
| 9086 | "base": null, |
| 9087 | "href": "data:///test", |
| 9088 | "origin": "null", |
| 9089 | "protocol": "data:", |
| 9090 | "username": "", |
| 9091 | "password": "", |
| 9092 | "host": "", |
| 9093 | "hostname": "", |
| 9094 | "port": "", |
| 9095 | "pathname": "/test", |
| 9096 | "search": "", |
| 9097 | "hash": "" |
| 9098 | }, |
| 9099 | { |
| 9100 | "input": "data://test/a/../b", |
| 9101 | "base": null, |
| 9102 | "href": "data://test/b", |
| 9103 | "origin": "null", |
| 9104 | "protocol": "data:", |
| 9105 | "username": "", |
| 9106 | "password": "", |
| 9107 | "host": "test", |
| 9108 | "hostname": "test", |
| 9109 | "port": "", |
| 9110 | "pathname": "/b", |
| 9111 | "search": "", |
| 9112 | "hash": "" |
| 9113 | }, |
| 9114 | { |
| 9115 | "input": "data://:443", |
| 9116 | "base": null, |
| 9117 | "failure": true |
| 9118 | }, |
| 9119 | { |
| 9120 | "input": "data://test:test", |
| 9121 | "base": null, |
| 9122 | "failure": true |
| 9123 | }, |
| 9124 | { |
| 9125 | "input": "data://[:1]", |
| 9126 | "base": null, |
| 9127 | "failure": true |
| 9128 | }, |
| 9129 | { |
| 9130 | "input": "javascript://example.com:8080/pathname?search#hash", |
| 9131 | "base": null, |
| 9132 | "href": "javascript://example.com:8080/pathname?search#hash", |
| 9133 | "origin": "null", |
| 9134 | "protocol": "javascript:", |
| 9135 | "username": "", |
| 9136 | "password": "", |
| 9137 | "host": "example.com:8080", |
| 9138 | "hostname": "example.com", |
| 9139 | "port": "8080", |
| 9140 | "pathname": "/pathname", |
| 9141 | "search": "?search", |
| 9142 | "hash": "#hash" |
| 9143 | }, |
| 9144 | { |
| 9145 | "input": "javascript:///test", |
| 9146 | "base": null, |
| 9147 | "href": "javascript:///test", |
| 9148 | "origin": "null", |
| 9149 | "protocol": "javascript:", |
| 9150 | "username": "", |
| 9151 | "password": "", |
| 9152 | "host": "", |
| 9153 | "hostname": "", |
| 9154 | "port": "", |
| 9155 | "pathname": "/test", |
| 9156 | "search": "", |
| 9157 | "hash": "" |
| 9158 | }, |
| 9159 | { |
| 9160 | "input": "javascript://test/a/../b", |
| 9161 | "base": null, |
| 9162 | "href": "javascript://test/b", |
| 9163 | "origin": "null", |
| 9164 | "protocol": "javascript:", |
| 9165 | "username": "", |
| 9166 | "password": "", |
| 9167 | "host": "test", |
| 9168 | "hostname": "test", |
| 9169 | "port": "", |
| 9170 | "pathname": "/b", |
| 9171 | "search": "", |
| 9172 | "hash": "" |
| 9173 | }, |
| 9174 | { |
| 9175 | "input": "javascript://:443", |
| 9176 | "base": null, |
| 9177 | "failure": true |
| 9178 | }, |
| 9179 | { |
| 9180 | "input": "javascript://test:test", |
| 9181 | "base": null, |
| 9182 | "failure": true |
| 9183 | }, |
| 9184 | { |
| 9185 | "input": "javascript://[:1]", |
| 9186 | "base": null, |
| 9187 | "failure": true |
| 9188 | }, |
| 9189 | { |
| 9190 | "input": "mailto://example.com:8080/pathname?search#hash", |
| 9191 | "base": null, |
| 9192 | "href": "mailto://example.com:8080/pathname?search#hash", |
| 9193 | "origin": "null", |
| 9194 | "protocol": "mailto:", |
| 9195 | "username": "", |
| 9196 | "password": "", |
| 9197 | "host": "example.com:8080", |
| 9198 | "hostname": "example.com", |
| 9199 | "port": "8080", |
| 9200 | "pathname": "/pathname", |
| 9201 | "search": "?search", |
| 9202 | "hash": "#hash" |
| 9203 | }, |
| 9204 | { |
| 9205 | "input": "mailto:///test", |
| 9206 | "base": null, |
| 9207 | "href": "mailto:///test", |
| 9208 | "origin": "null", |
| 9209 | "protocol": "mailto:", |
| 9210 | "username": "", |
| 9211 | "password": "", |
| 9212 | "host": "", |
| 9213 | "hostname": "", |
| 9214 | "port": "", |
| 9215 | "pathname": "/test", |
| 9216 | "search": "", |
| 9217 | "hash": "" |
| 9218 | }, |
| 9219 | { |
| 9220 | "input": "mailto://test/a/../b", |
| 9221 | "base": null, |
| 9222 | "href": "mailto://test/b", |
| 9223 | "origin": "null", |
| 9224 | "protocol": "mailto:", |
| 9225 | "username": "", |
| 9226 | "password": "", |
| 9227 | "host": "test", |
| 9228 | "hostname": "test", |
| 9229 | "port": "", |
| 9230 | "pathname": "/b", |
| 9231 | "search": "", |
| 9232 | "hash": "" |
| 9233 | }, |
| 9234 | { |
| 9235 | "input": "mailto://:443", |
| 9236 | "base": null, |
| 9237 | "failure": true |
| 9238 | }, |
| 9239 | { |
| 9240 | "input": "mailto://test:test", |
| 9241 | "base": null, |
| 9242 | "failure": true |
| 9243 | }, |
| 9244 | { |
| 9245 | "input": "mailto://[:1]", |
| 9246 | "base": null, |
| 9247 | "failure": true |
| 9248 | }, |
| 9249 | { |
| 9250 | "input": "intent://example.com:8080/pathname?search#hash", |
| 9251 | "base": null, |
| 9252 | "href": "intent://example.com:8080/pathname?search#hash", |
| 9253 | "origin": "null", |
| 9254 | "protocol": "intent:", |
| 9255 | "username": "", |
| 9256 | "password": "", |
| 9257 | "host": "example.com:8080", |
| 9258 | "hostname": "example.com", |
| 9259 | "port": "8080", |
| 9260 | "pathname": "/pathname", |
| 9261 | "search": "?search", |
| 9262 | "hash": "#hash" |
| 9263 | }, |
| 9264 | { |
| 9265 | "input": "intent:///test", |
| 9266 | "base": null, |
| 9267 | "href": "intent:///test", |
| 9268 | "origin": "null", |
| 9269 | "protocol": "intent:", |
| 9270 | "username": "", |
| 9271 | "password": "", |
| 9272 | "host": "", |
| 9273 | "hostname": "", |
| 9274 | "port": "", |
| 9275 | "pathname": "/test", |
| 9276 | "search": "", |
| 9277 | "hash": "" |
| 9278 | }, |
| 9279 | { |
| 9280 | "input": "intent://test/a/../b", |
| 9281 | "base": null, |
| 9282 | "href": "intent://test/b", |
| 9283 | "origin": "null", |
| 9284 | "protocol": "intent:", |
| 9285 | "username": "", |
| 9286 | "password": "", |
| 9287 | "host": "test", |
| 9288 | "hostname": "test", |
| 9289 | "port": "", |
| 9290 | "pathname": "/b", |
| 9291 | "search": "", |
| 9292 | "hash": "" |
| 9293 | }, |
| 9294 | { |
| 9295 | "input": "intent://:443", |
| 9296 | "base": null, |
| 9297 | "failure": true |
| 9298 | }, |
| 9299 | { |
| 9300 | "input": "intent://test:test", |
| 9301 | "base": null, |
| 9302 | "failure": true |
| 9303 | }, |
| 9304 | { |
| 9305 | "input": "intent://[:1]", |
| 9306 | "base": null, |
| 9307 | "failure": true |
| 9308 | }, |
| 9309 | { |
| 9310 | "input": "urn://example.com:8080/pathname?search#hash", |
| 9311 | "base": null, |
| 9312 | "href": "urn://example.com:8080/pathname?search#hash", |
| 9313 | "origin": "null", |
| 9314 | "protocol": "urn:", |
| 9315 | "username": "", |
| 9316 | "password": "", |
| 9317 | "host": "example.com:8080", |
| 9318 | "hostname": "example.com", |
| 9319 | "port": "8080", |
| 9320 | "pathname": "/pathname", |
| 9321 | "search": "?search", |
| 9322 | "hash": "#hash" |
| 9323 | }, |
| 9324 | { |
| 9325 | "input": "urn:///test", |
| 9326 | "base": null, |
| 9327 | "href": "urn:///test", |
| 9328 | "origin": "null", |
| 9329 | "protocol": "urn:", |
| 9330 | "username": "", |
| 9331 | "password": "", |
| 9332 | "host": "", |
| 9333 | "hostname": "", |
| 9334 | "port": "", |
| 9335 | "pathname": "/test", |
| 9336 | "search": "", |
| 9337 | "hash": "" |
| 9338 | }, |
| 9339 | { |
| 9340 | "input": "urn://test/a/../b", |
| 9341 | "base": null, |
| 9342 | "href": "urn://test/b", |
| 9343 | "origin": "null", |
| 9344 | "protocol": "urn:", |
| 9345 | "username": "", |
| 9346 | "password": "", |
| 9347 | "host": "test", |
| 9348 | "hostname": "test", |
| 9349 | "port": "", |
| 9350 | "pathname": "/b", |
| 9351 | "search": "", |
| 9352 | "hash": "" |
| 9353 | }, |
| 9354 | { |
| 9355 | "input": "urn://:443", |
| 9356 | "base": null, |
| 9357 | "failure": true |
| 9358 | }, |
| 9359 | { |
| 9360 | "input": "urn://test:test", |
| 9361 | "base": null, |
| 9362 | "failure": true |
| 9363 | }, |
| 9364 | { |
| 9365 | "input": "urn://[:1]", |
| 9366 | "base": null, |
| 9367 | "failure": true |
| 9368 | }, |
| 9369 | { |
| 9370 | "input": "turn://example.com:8080/pathname?search#hash", |
| 9371 | "base": null, |
| 9372 | "href": "turn://example.com:8080/pathname?search#hash", |
| 9373 | "origin": "null", |
| 9374 | "protocol": "turn:", |
| 9375 | "username": "", |
| 9376 | "password": "", |
| 9377 | "host": "example.com:8080", |
| 9378 | "hostname": "example.com", |
| 9379 | "port": "8080", |
| 9380 | "pathname": "/pathname", |
| 9381 | "search": "?search", |
| 9382 | "hash": "#hash" |
| 9383 | }, |
| 9384 | { |
| 9385 | "input": "turn:///test", |
| 9386 | "base": null, |
| 9387 | "href": "turn:///test", |
| 9388 | "origin": "null", |
| 9389 | "protocol": "turn:", |
| 9390 | "username": "", |
| 9391 | "password": "", |
| 9392 | "host": "", |
| 9393 | "hostname": "", |
| 9394 | "port": "", |
| 9395 | "pathname": "/test", |
| 9396 | "search": "", |
| 9397 | "hash": "" |
| 9398 | }, |
| 9399 | { |
| 9400 | "input": "turn://test/a/../b", |
| 9401 | "base": null, |
| 9402 | "href": "turn://test/b", |
| 9403 | "origin": "null", |
| 9404 | "protocol": "turn:", |
| 9405 | "username": "", |
| 9406 | "password": "", |
| 9407 | "host": "test", |
| 9408 | "hostname": "test", |
| 9409 | "port": "", |
| 9410 | "pathname": "/b", |
| 9411 | "search": "", |
| 9412 | "hash": "" |
| 9413 | }, |
| 9414 | { |
| 9415 | "input": "turn://:443", |
| 9416 | "base": null, |
| 9417 | "failure": true |
| 9418 | }, |
| 9419 | { |
| 9420 | "input": "turn://test:test", |
| 9421 | "base": null, |
| 9422 | "failure": true |
| 9423 | }, |
| 9424 | { |
| 9425 | "input": "turn://[:1]", |
| 9426 | "base": null, |
| 9427 | "failure": true |
| 9428 | }, |
| 9429 | { |
| 9430 | "input": "stun://example.com:8080/pathname?search#hash", |
| 9431 | "base": null, |
| 9432 | "href": "stun://example.com:8080/pathname?search#hash", |
| 9433 | "origin": "null", |
| 9434 | "protocol": "stun:", |
| 9435 | "username": "", |
| 9436 | "password": "", |
| 9437 | "host": "example.com:8080", |
| 9438 | "hostname": "example.com", |
| 9439 | "port": "8080", |
| 9440 | "pathname": "/pathname", |
| 9441 | "search": "?search", |
| 9442 | "hash": "#hash" |
| 9443 | }, |
| 9444 | { |
| 9445 | "input": "stun:///test", |
| 9446 | "base": null, |
| 9447 | "href": "stun:///test", |
| 9448 | "origin": "null", |
| 9449 | "protocol": "stun:", |
| 9450 | "username": "", |
| 9451 | "password": "", |
| 9452 | "host": "", |
| 9453 | "hostname": "", |
| 9454 | "port": "", |
| 9455 | "pathname": "/test", |
| 9456 | "search": "", |
| 9457 | "hash": "" |
| 9458 | }, |
| 9459 | { |
| 9460 | "input": "stun://test/a/../b", |
| 9461 | "base": null, |
| 9462 | "href": "stun://test/b", |
| 9463 | "origin": "null", |
| 9464 | "protocol": "stun:", |
| 9465 | "username": "", |
| 9466 | "password": "", |
| 9467 | "host": "test", |
| 9468 | "hostname": "test", |
| 9469 | "port": "", |
| 9470 | "pathname": "/b", |
| 9471 | "search": "", |
| 9472 | "hash": "" |
| 9473 | }, |
| 9474 | { |
| 9475 | "input": "stun://:443", |
| 9476 | "base": null, |
| 9477 | "failure": true |
| 9478 | }, |
| 9479 | { |
| 9480 | "input": "stun://test:test", |
| 9481 | "base": null, |
| 9482 | "failure": true |
| 9483 | }, |
| 9484 | { |
| 9485 | "input": "stun://[:1]", |
| 9486 | "base": null, |
| 9487 | "failure": true |
| 9488 | }, |
| 9489 | { |
| 9490 | "input": "w://x:0", |
| 9491 | "base": null, |
| 9492 | "href": "w://x:0", |
| 9493 | "origin": "null", |
| 9494 | "protocol": "w:", |
| 9495 | "username": "", |
| 9496 | "password": "", |
| 9497 | "host": "x:0", |
| 9498 | "hostname": "x", |
| 9499 | "port": "0", |
| 9500 | "pathname": "", |
| 9501 | "search": "", |
| 9502 | "hash": "" |
| 9503 | }, |
| 9504 | { |
| 9505 | "input": "west://x:0", |
| 9506 | "base": null, |
| 9507 | "href": "west://x:0", |
| 9508 | "origin": "null", |
| 9509 | "protocol": "west:", |
| 9510 | "username": "", |
| 9511 | "password": "", |
| 9512 | "host": "x:0", |
| 9513 | "hostname": "x", |
| 9514 | "port": "0", |
| 9515 | "pathname": "", |
| 9516 | "search": "", |
| 9517 | "hash": "" |
| 9518 | } |
| 9519 | ] |