|
825 | 825 | "port": ""
|
826 | 826 | }
|
827 | 827 | },
|
| 828 | + { |
| 829 | + "comment": "Stuff after a ? delimiter is ignored, trailing 'port'", |
| 830 | + "href": "http://example.net/path", |
| 831 | + "new_value": "example.com?stuff:8080", |
| 832 | + "expected": { |
| 833 | + "href": "http://example.com/path", |
| 834 | + "host": "example.com", |
| 835 | + "hostname": "example.com", |
| 836 | + "port": "" |
| 837 | + } |
| 838 | + }, |
828 | 839 | {
|
829 | 840 | "comment": "Stuff after a ? delimiter is ignored",
|
830 | 841 | "href": "http://example.net/path",
|
|
924 | 935 | "port": "8080"
|
925 | 936 | }
|
926 | 937 | },
|
| 938 | + { |
| 939 | + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", |
| 940 | + "href": "http://example.net:8080", |
| 941 | + "new_value": "example.com:invalid", |
| 942 | + "expected": { |
| 943 | + "href": "http://example.com:8080/", |
| 944 | + "host": "example.com:8080", |
| 945 | + "hostname": "example.com", |
| 946 | + "port": "8080" |
| 947 | + } |
| 948 | + }, |
| 949 | + { |
| 950 | + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", |
| 951 | + "href": "http://example.net:8080/test", |
| 952 | + "new_value": "[::1]:invalid", |
| 953 | + "expected": { |
| 954 | + "href": "http://[::1]:8080/test", |
| 955 | + "host": "[::1]:8080", |
| 956 | + "hostname": "[::1]", |
| 957 | + "port": "8080" |
| 958 | + } |
| 959 | + }, |
| 960 | + { |
| 961 | + "comment": "IPv6 without port", |
| 962 | + "href": "http://example.net:8080/test", |
| 963 | + "new_value": "[::1]", |
| 964 | + "expected": { |
| 965 | + "href": "http://[::1]:8080/test", |
| 966 | + "host": "[::1]:8080", |
| 967 | + "hostname": "[::1]", |
| 968 | + "port": "8080" |
| 969 | + } |
| 970 | + }, |
927 | 971 | {
|
928 | 972 | "comment": "Port numbers are 16 bit integers",
|
929 | 973 | "href": "http://example.net/path",
|
|
0 commit comments