RFR: 8352431: java/net/httpclient/EmptyAuthenticate.java uses "localhost"
Daniel Fuchs
dfuchs at openjdk.org
Wed Apr 9 11:38:36 UTC 2025
On Wed, 9 Apr 2025 11:12:31 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
> Overhauls `EmptyAuthenticate` to
>
> - Test all supported HTTP versions (i.e., HTTP/1.1 and HTTP/2)
> - Test both clear-text and SSL
> - Use `HttpServerAdapters.HttpTestServer::create` to avoid host-related problems
test/jdk/java/net/httpclient/EmptyAuthenticate.java line 103:
> 101: : HttpTestServer.create(version);
> 102: HttpTestHandler handler = new ServerHandlerRespondingWithEmptyWwwAuthHeader();
> 103: server.addHandler(handler, "/");
Suggestion:
server.addHandler(handler, "/EmptyAuthenticate/");
test/jdk/java/net/httpclient/EmptyAuthenticate.java line 137:
> 135:
> 136: private static HttpRequest createRequest(HttpTestServer server, boolean secure) {
> 137: URI uri = URI.create("%s://%s/".formatted(secure ? "https" : "http", server.serverAuthority()));
Suggestion:
URI uri = URI.create("%s://%s/EmptyAuthenticate/%s".formatted(secure ? "https" : "http", server.serverAuthority(), server.gerVersion()));
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24542#discussion_r2035173678
PR Review Comment: https://git.openjdk.org/jdk/pull/24542#discussion_r2035178194
More information about the net-dev
mailing list