forked from I2P_Developers/i2p.i2p
Fix broken I2PSocketEepGet test, add additional case
Broken in 49d33fa03636041c4da35476539a3b6aa318da11 by the move from URL to URI. If URI is passed a URL with a negative port, URI.getHost() returns null, which bypasses the coercion-to-80. Zero, OTOH, is still coerced.
This commit is contained in:
@@ -117,8 +117,14 @@ public class I2PSocketEepGetTest {
|
||||
|
||||
@Test
|
||||
public void testFetch_negPort() {
|
||||
// Fails, because URI is stricter than URL
|
||||
fetchFrom("http://" + STATS_HOST + ":-1", false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFetch_zeroPort() {
|
||||
// Gets rewritten to 80
|
||||
fetchFrom("http://" + STATS_HOST + ":-1", true);
|
||||
fetchFrom("http://" + STATS_HOST + ":0", true);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user