test/jdk/java/net/httpclient/ProxyAuthTest.java
branchhttp-client-branch
changeset 56089 42208b2f224e
parent 56082 1da51fab3032
child 56167 96fa4f49a9ff
equal deleted inserted replaced
56088:38fac6d0521d 56089:42208b2f224e
    25 
    25 
    26 /*
    26 /*
    27  * @test
    27  * @test
    28  * @bug 8163561
    28  * @bug 8163561
    29  * @modules java.base/sun.net.www
    29  * @modules java.base/sun.net.www
    30  *          jdk.incubator.httpclient
    30  *          java.net.http
    31  * @summary Verify that Proxy-Authenticate header is correctly handled
    31  * @summary Verify that Proxy-Authenticate header is correctly handled
    32  * @run main/othervm ProxyAuthTest
    32  * @run main/othervm ProxyAuthTest
    33  */
    33  */
    34 
    34 
    35 import java.io.BufferedWriter;
    35 import java.io.BufferedWriter;
    45 import java.net.ProxySelector;
    45 import java.net.ProxySelector;
    46 import java.net.ServerSocket;
    46 import java.net.ServerSocket;
    47 import java.net.Socket;
    47 import java.net.Socket;
    48 import java.net.SocketAddress;
    48 import java.net.SocketAddress;
    49 import java.net.URI;
    49 import java.net.URI;
    50 import jdk.incubator.http.HttpClient;
    50 import java.net.http.HttpClient;
    51 import jdk.incubator.http.HttpRequest;
    51 import java.net.http.HttpRequest;
    52 import jdk.incubator.http.HttpResponse;
    52 import java.net.http.HttpResponse;
    53 import java.util.Base64;
    53 import java.util.Base64;
    54 import java.util.List;
    54 import java.util.List;
    55 import sun.net.www.MessageHeader;
    55 import sun.net.www.MessageHeader;
    56 import static jdk.incubator.http.HttpResponse.BodyHandler.discard;
    56 import static java.net.http.HttpResponse.BodyHandler.discard;
    57 
    57 
    58 public class ProxyAuthTest {
    58 public class ProxyAuthTest {
    59     private static final String AUTH_USER = "user";
    59     private static final String AUTH_USER = "user";
    60     private static final String AUTH_PASSWORD = "password";
    60     private static final String AUTH_PASSWORD = "password";
    61 
    61