diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs index 1895642e2ce..178a951f448 100644 --- a/components/net/fetch/methods.rs +++ b/components/net/fetch/methods.rs @@ -948,11 +948,12 @@ fn is_network_scheme(scheme: &str) -> bool { /// fn is_bad_port(port: u16) -> bool { - static BAD_PORTS: [u16; 69] = [ - 1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 77, 79, 87, 95, 101, 102, - 103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 139, 143, 179, 389, 427, 465, 512, - 513, 514, 515, 526, 530, 531, 532, 540, 548, 556, 563, 587, 601, 636, 993, 995, 2049, 3659, - 4045, 5060, 5061, 6000, 6665, 6666, 6667, 6668, 6669, 6697, + static BAD_PORTS: [u16; 77] = [ + 1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 69, 77, 79, 87, 95, 101, + 102, 103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 137, 139, 143, 161, 179, 389, + 427, 465, 512, 513, 514, 515, 526, 530, 531, 532, 540, 548, 554, 556, 563, 587, 601, 636, + 993, 995, 1719, 1720, 1723, 2049, 3659, 4045, 5060, 5061, 6000, 6566, 6665, 6666, 6667, + 6668, 6669, 6697, ]; BAD_PORTS.binary_search(&port).is_ok() diff --git a/tests/wpt/metadata/fetch/api/request/request-bad-port.any.js.ini b/tests/wpt/metadata/fetch/api/request/request-bad-port.any.js.ini index 1677e17d51e..90d740ff11d 100644 --- a/tests/wpt/metadata/fetch/api/request/request-bad-port.any.js.ini +++ b/tests/wpt/metadata/fetch/api/request/request-bad-port.any.js.ini @@ -1,101 +1,5 @@ [request-bad-port.any.serviceworker.html] expected: ERROR -[request-bad-port.any.html] - expected: TIMEOUT - [Request on bad port 6697 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 3659 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 554 should throw TypeError.] - expected: TIMEOUT - - [Request on bad port 4045 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 1720 should throw TypeError.] - expected: TIMEOUT - - [Request on bad port 6665 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6000 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 1723 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6666 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6667 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6668 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6669 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 2049 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 5061 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 5060 should throw TypeError.] - expected: NOTRUN - - -[request-bad-port.any.worker.html] - expected: TIMEOUT - [Request on bad port 6697 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 3659 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 554 should throw TypeError.] - expected: TIMEOUT - - [Request on bad port 4045 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 1720 should throw TypeError.] - expected: TIMEOUT - - [Request on bad port 6665 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6000 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 1723 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6666 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6667 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6668 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 6669 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 2049 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 5061 should throw TypeError.] - expected: NOTRUN - - [Request on bad port 5060 should throw TypeError.] - expected: NOTRUN - - [request-bad-port.any.sharedworker.html] expected: ERROR