Fix hostport concatenation.
You can't just stick a colon between them if the host might be an IPv6 literal.
@@ -97,7 +97,7 @@ public void shouldStripKeepAliveHeader() throws IOException {
public Server() throws IOException {
int port = PortProber.findFreePort();
String address = new NetworkUtils().getPrivateLocalAddress();
- url = new URL(String.format("http://%s:%d/ok", address, port));
+ url = new URL("http", address, port, "/ok");
server = HttpServer.create(new InetSocketAddress(address, port), 0);
server.createContext("/ok", ex -> {
