< prev index next >

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

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6520665 6357133

  27  * @run main/othervm NTLMTest
  28  * @summary 6520665 & 6357133: NTLM authentication issues.
  29  */
  30 
  31 import java.net.*;
  32 import java.io.*;
  33 import sun.net.www.MessageHeader;
  34 
  35 public class NTLMTest
  36 {
  37     public static void main(String[] args) {
  38         Authenticator.setDefault(new NullAuthenticator());
  39 
  40         try {
  41             // Test with direct connection.
  42             ServerSocket serverSS = new ServerSocket(0);
  43             startServer(serverSS, false);
  44             runClient(Proxy.NO_PROXY, serverSS.getLocalPort());
  45 
  46             // Test with proxy.




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6520665 6357133
  27  * @modules java.base/sun.net.www
  28  * @run main/othervm NTLMTest
  29  * @summary 6520665 & 6357133: NTLM authentication issues.
  30  */
  31 
  32 import java.net.*;
  33 import java.io.*;
  34 import sun.net.www.MessageHeader;
  35 
  36 public class NTLMTest
  37 {
  38     public static void main(String[] args) {
  39         Authenticator.setDefault(new NullAuthenticator());
  40 
  41         try {
  42             // Test with direct connection.
  43             ServerSocket serverSS = new ServerSocket(0);
  44             startServer(serverSS, false);
  45             runClient(Proxy.NO_PROXY, serverSS.getLocalPort());
  46 
  47             // Test with proxy.


< prev index next >