test/jdk/com/sun/net/httpserver/bugs/8199849/BasicAuthenticatorCharset.java
changeset 58009 0daf32316b47
parent 57838 78844dceede6
child 58679 9c3209ff7550
equal deleted inserted replaced
58008:9ae63aa9fc22 58009:0daf32316b47
   155             .build();
   155             .build();
   156 
   156 
   157         String defaultCharset = System.getProperty("file.encoding");
   157         String defaultCharset = System.getProperty("file.encoding");
   158         boolean isUTF8 = defaultCharset.equalsIgnoreCase("UTF-8");
   158         boolean isUTF8 = defaultCharset.equalsIgnoreCase("UTF-8");
   159         testHandler = new Handler();
   159         testHandler = new Handler();
   160         InetSocketAddress addr = new InetSocketAddress(0);
   160         InetSocketAddress addr = new InetSocketAddress(InetAddress.getLoopbackAddress(), 0);
   161         testHttpServer = HttpServer.create(addr, 0);
   161         testHttpServer = HttpServer.create(addr, 0);
   162 
   162 
   163         // Set the passing credentials OLD client
   163         // Set the passing credentials OLD client
   164         setAuthenticationPW("/old/test1/", "passingCharset@test.realm", UNICODE_PW, UTF_8);
   164         setAuthenticationPW("/old/test1/", "passingCharset@test.realm", UNICODE_PW, UTF_8);
   165         setAuthenticationPW("/old/test2/", "failingCharset@test.realm", UNICODE_PW, ISO_8859_1);
   165         setAuthenticationPW("/old/test2/", "failingCharset@test.realm", UNICODE_PW, ISO_8859_1);