test/java/net/Authenticator/B4722333.java

Print this page

        

*** 23,33 **** /** * @test * @bug 4722333 * @library ../../../sun/net/www/httptest/ ! * @build HttpCallback HttpServer ClosedChannelList HttpTransaction * @run main B4722333 * @summary JRE Proxy Authentication Not Working with ISA2000 */ import java.io.*; --- 23,33 ---- /** * @test * @bug 4722333 * @library ../../../sun/net/www/httptest/ ! * @build HttpCallback TestHttpServer ClosedChannelList HttpTransaction * @run main B4722333 * @summary JRE Proxy Authentication Not Working with ISA2000 */ import java.io.*;
*** 112,128 **** InputStream is = urlc.getInputStream (); read (is); is.close(); } ! static HttpServer server; public static void main (String[] args) throws Exception { MyAuthenticator auth = new MyAuthenticator (); Authenticator.setDefault (auth); try { ! server = new HttpServer (new B4722333(), 1, 10, 0); System.out.println ("Server started: listening on port: " + server.getLocalPort()); client ("http://localhost:"+server.getLocalPort()+"/d1/d2/d3/foo.html"); client ("http://localhost:"+server.getLocalPort()+"/ASD/d3/x.html"); client ("http://localhost:"+server.getLocalPort()+"/biz/d3/x.html"); client ("http://localhost:"+server.getLocalPort()+"/bar/d3/x.html"); --- 112,128 ---- InputStream is = urlc.getInputStream (); read (is); is.close(); } ! static TestHttpServer server; public static void main (String[] args) throws Exception { MyAuthenticator auth = new MyAuthenticator (); Authenticator.setDefault (auth); try { ! server = new TestHttpServer (new B4722333(), 1, 10, 0); System.out.println ("Server started: listening on port: " + server.getLocalPort()); client ("http://localhost:"+server.getLocalPort()+"/d1/d2/d3/foo.html"); client ("http://localhost:"+server.getLocalPort()+"/ASD/d3/x.html"); client ("http://localhost:"+server.getLocalPort()+"/biz/d3/x.html"); client ("http://localhost:"+server.getLocalPort()+"/bar/d3/x.html");