test/java/net/Authenticator/B4962064.java

Print this page

        

@@ -23,11 +23,11 @@
 
 /**
  * @test
  * @bug 4962064
  * @library ../../../sun/net/www/httptest/
- * @build HttpCallback HttpServer ClosedChannelList HttpTransaction
+ * @build HttpCallback TestHttpServer ClosedChannelList HttpTransaction
  * @run main/othervm B4962064
  * @summary Extend Authenticator to provide access to request URI and server/proxy
  */
 
 import java.io.*;

@@ -83,16 +83,16 @@
         InputStream is = urlc.getInputStream ();
         read (is);
         is.close();
     }
 
-    static HttpServer server;
+    static TestHttpServer server;
     static URL urlsave;
 
     public static void main (String[] args) throws Exception {
         try {
-            server = new HttpServer (new B4962064(), 1, 10, 0);
+            server = new TestHttpServer (new B4962064(), 1, 10, 0);
             int port = server.getLocalPort();
             System.setProperty ("http.proxyHost", "localhost");
             System.setProperty ("http.proxyPort", Integer.toString (port));
             MyAuthenticator auth = new MyAuthenticator ();
             Authenticator.setDefault (auth);