43 import java.util.stream.Collectors; |
43 import java.util.stream.Collectors; |
44 import java.util.stream.Stream; |
44 import java.util.stream.Stream; |
45 import javax.net.ssl.SSLContext; |
45 import javax.net.ssl.SSLContext; |
46 import javax.net.ServerSocketFactory; |
46 import javax.net.ServerSocketFactory; |
47 import javax.net.ssl.SSLServerSocketFactory; |
47 import javax.net.ssl.SSLServerSocketFactory; |
48 import jdk.incubator.http.HttpClient; |
48 import java.net.http.HttpClient; |
49 import jdk.incubator.http.HttpClient.Version; |
49 import java.net.http.HttpClient.Version; |
50 import jdk.incubator.http.HttpRequest; |
50 import java.net.http.HttpRequest; |
51 import jdk.incubator.http.HttpResponse; |
51 import java.net.http.HttpResponse; |
52 import jdk.testlibrary.SimpleSSLContext; |
52 import jdk.testlibrary.SimpleSSLContext; |
53 import sun.net.NetProperties; |
53 import sun.net.NetProperties; |
54 import sun.net.www.HeaderParser; |
54 import sun.net.www.HeaderParser; |
55 import static java.lang.System.out; |
55 import static java.lang.System.out; |
56 import static java.lang.String.format; |
56 import static java.lang.String.format; |
57 import static jdk.incubator.http.HttpResponse.BodyHandler.asLines; |
57 import static java.net.http.HttpResponse.BodyHandler.asLines; |
58 |
58 |
59 /** |
59 /** |
60 * @test |
60 * @test |
61 * @summary this test verifies that a client may provides authorization |
61 * @summary this test verifies that a client may provides authorization |
62 * headers directly when connecting with a server. |
62 * headers directly when connecting with a server. |
63 * @bug 8087112 |
63 * @bug 8087112 |
64 * @library /lib/testlibrary http2/server |
64 * @library /lib/testlibrary http2/server |
65 * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DigestEchoServer DigestEchoClient |
65 * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DigestEchoServer DigestEchoClient |
66 * @modules jdk.incubator.httpclient/jdk.incubator.http.internal.common |
66 * @modules java.net.http/java.net.http.internal.common |
67 * jdk.incubator.httpclient/jdk.incubator.http.internal.frame |
67 * java.net.http/java.net.http.internal.frame |
68 * jdk.incubator.httpclient/jdk.incubator.http.internal.hpack |
68 * java.net.http/java.net.http.internal.hpack |
69 * java.logging |
69 * java.logging |
70 * java.base/sun.net.www.http |
70 * java.base/sun.net.www.http |
71 * java.base/sun.net.www |
71 * java.base/sun.net.www |
72 * java.base/sun.net |
72 * java.base/sun.net |
73 * @run main/othervm DigestEchoClient |
73 * @run main/othervm DigestEchoClient |