equal
deleted
inserted
replaced
22 */ |
22 */ |
23 |
23 |
24 /** |
24 /** |
25 * @test |
25 * @test |
26 * @bug 8087112 |
26 * @bug 8087112 |
27 * @modules jdk.incubator.httpclient |
27 * @modules java.net.http |
28 * jdk.httpserver |
28 * jdk.httpserver |
29 * @run main/othervm BasicAuthTest |
29 * @run main/othervm BasicAuthTest |
30 * @summary Basic Authentication Test |
30 * @summary Basic Authentication Test |
31 */ |
31 */ |
32 |
32 |
39 import java.io.InputStream; |
39 import java.io.InputStream; |
40 import java.io.OutputStream; |
40 import java.io.OutputStream; |
41 import java.net.InetSocketAddress; |
41 import java.net.InetSocketAddress; |
42 import java.net.PasswordAuthentication; |
42 import java.net.PasswordAuthentication; |
43 import java.net.URI; |
43 import java.net.URI; |
44 import jdk.incubator.http.*; |
44 import java.net.http.*; |
45 import java.util.concurrent.ExecutorService; |
45 import java.util.concurrent.ExecutorService; |
46 import java.util.concurrent.Executors; |
46 import java.util.concurrent.Executors; |
47 import static java.nio.charset.StandardCharsets.US_ASCII; |
47 import static java.nio.charset.StandardCharsets.US_ASCII; |
48 import static jdk.incubator.http.HttpRequest.BodyPublisher.fromString; |
48 import static java.net.http.HttpRequest.BodyPublisher.fromString; |
49 import static jdk.incubator.http.HttpResponse.BodyHandler.asString; |
49 import static java.net.http.HttpResponse.BodyHandler.asString; |
50 |
50 |
51 public class BasicAuthTest { |
51 public class BasicAuthTest { |
52 |
52 |
53 static volatile boolean ok; |
53 static volatile boolean ok; |
54 static final String RESPONSE = "Hello world"; |
54 static final String RESPONSE = "Hello world"; |