|
20 | 20 | * or visit www.oracle.com if you need additional information or have any
|
21 | 21 | * questions.
|
22 | 22 | */
|
23 |
| -import com.sun.net.httpserver.HttpServer; |
24 |
| -import com.sun.net.httpserver.HttpsConfigurator; |
25 | 23 | import com.sun.net.httpserver.HttpsServer;
|
| 24 | +import jdk.httpclient.test.lib.common.TestServerConfigurator; |
26 | 25 | import jdk.test.lib.net.SimpleSSLContext;
|
27 | 26 |
|
28 | 27 | import javax.net.ssl.SSLContext;
|
|
38 | 37 | import java.net.http.HttpClient;
|
39 | 38 | import java.net.http.HttpRequest;
|
40 | 39 | import java.net.http.HttpResponse;
|
41 |
| -import java.nio.charset.StandardCharsets; |
42 | 40 | import java.time.Duration;
|
43 | 41 | import java.util.List;
|
44 | 42 | import java.util.Set;
|
|
51 | 49 | import java.util.concurrent.TimeUnit;
|
52 | 50 | import java.util.concurrent.atomic.AtomicLong;
|
53 | 51 | import jdk.httpclient.test.lib.common.HttpServerAdapters;
|
54 |
| -import jdk.httpclient.test.lib.http2.Http2TestServer; |
55 | 52 | import static java.net.http.HttpClient.Version.HTTP_1_1;
|
56 | 53 | import static java.net.http.HttpClient.Version.HTTP_2;
|
57 | 54 |
|
|
64 | 61 | * @library /test/lib /test/jdk/java/net/httpclient/lib
|
65 | 62 | * @build jdk.httpclient.test.lib.common.HttpServerAdapters
|
66 | 63 | * jdk.test.lib.net.SimpleSSLContext DigestEchoServer
|
| 64 | + * jdk.httpclient.test.lib.common.TestServerConfigurator |
67 | 65 | * @run main/othervm -Dtest.requiresHost=true
|
68 | 66 | * -Djdk.httpclient.HttpClient.log=headers
|
69 | 67 | * -Djdk.internal.httpclient.debug=true
|
@@ -136,7 +134,7 @@ public void setUp() throws Exception {
|
136 | 134 | // HTTPS/1.1
|
137 | 135 | HttpsServer sserver1 = HttpsServer.create(sa, 100);
|
138 | 136 | sserver1.setExecutor(executor);
|
139 |
| - sserver1.setHttpsConfigurator(new HttpsConfigurator(context)); |
| 137 | + sserver1.setHttpsConfigurator(new TestServerConfigurator(sa.getAddress(), context)); |
140 | 138 | https1Server = HttpTestServer.of(sserver1);
|
141 | 139 | https1Server.addHandler(new HttpTestLargeHandler(), "/LargeResponseTest/https1/");
|
142 | 140 | https1Server.start();
|
|
0 commit comments