Skip to content

Commit da4dd7c

Browse files
committed
8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs
Reviewed-by: jpai, djelinski, gli
1 parent 49d8008 commit da4dd7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/jdk/java/net/httpclient/ManyRequests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -187,7 +187,7 @@ static void test(HttpsServer server, HttpClient client) throws Exception {
187187

188188
URI baseURI = URIBuilder.newBuilder()
189189
.scheme("https")
190-
.host(InetAddress.getLoopbackAddress().getHostName())
190+
.loopback()
191191
.port(port)
192192
.path("/foo/x").build();
193193
server.createContext("/foo", new TestEchoHandler());

0 commit comments

Comments
 (0)