test/sun/net/www/protocol/http/RelativeRedirect.java

Print this page

        

@@ -23,21 +23,21 @@
 
 /**
  * @test
  * @bug 4726087
  * @library ../../httptest/
- * @build HttpCallback HttpServer ClosedChannelList HttpTransaction
+ * @build HttpCallback TestHttpServer ClosedChannelList HttpTransaction
  * @run main RelativeRedirect
  * @summary URLConnection cannot handle redirects
  */
 
 import java.io.*;
 import java.net.*;
 
 public class RelativeRedirect implements HttpCallback {
     static int count = 0;
-    static HttpServer server;
+    static TestHttpServer server;
 
     static class MyAuthenticator extends Authenticator {
         public MyAuthenticator () {
             super ();
         }

@@ -87,11 +87,11 @@
 
     public static void main (String[] args) throws Exception {
         MyAuthenticator auth = new MyAuthenticator ();
         Authenticator.setDefault (auth);
         try {
-            server = new HttpServer (new RelativeRedirect(), 1, 10, 0);
+            server = new TestHttpServer (new RelativeRedirect(), 1, 10, 0);
             System.out.println ("Server: listening on port: " + server.getLocalPort());
             URL url = new URL("http://localhost:"+server.getLocalPort());
             System.out.println ("client opening connection to: " + url);
             HttpURLConnection urlc = (HttpURLConnection)url.openConnection ();
             InputStream is = urlc.getInputStream ();