Hi Daniel, On 27/08/19 4:49 PM, Daniel Fuchs wrote: > Hi Jaikiran, > > Looks good. > > While you're at it, would you mind using > jdk.test.lib.net.URIBuilder from the /test/lib > library instead of composing the URL string by hand? > > Something like: > > URL targetURL = URIBuilder.newBuilder() > .scheme("http") > .host(server.getAddress().getAddress()) > .port(server.getAddress().getPort()) > .path(WEB_APP_CONTEXT) > .toURL(); > > > I've come across some host configurations where: > > InetAddress.getLoopbackAddress().getHostName() => "localhost" > but InetAddress.getByName("localhost") returns the external IP (and > not the loopback). It all depends on what is listed in /etc/hosts. > > Using URIBuilder as above will ensure that the host address is > used (instead of the host name) and that "[" "]" are inserted > if the address is an IPv6 literal.
Understood. Here's an updated webrev to include this change http://cr.openjdk.java.net/~jpai/webrev/8230220/2/webrev/ -Jaikiran