< prev index next >

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

Print this page




   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 /* @test
  25  * @bug 8004502
  26  * @summary Sanity check that NTLM will not be selected by the http protocol
  27  *    handler when running on a profile that does not support NTLM

  28  * @run main/othervm NoNTLM
  29  */
  30 
  31 import java.net.*;
  32 import java.io.*;
  33 import sun.net.www.MessageHeader;
  34 
  35 public class NoNTLM {
  36 
  37     static final String CRLF = "\r\n";
  38 
  39     static final String OKAY =
  40         "HTTP/1.1 200" + CRLF +
  41         "Content-Length: 0" + CRLF +
  42         "Connection: close" + CRLF +
  43         CRLF;
  44 
  45     static class Client implements Runnable {
  46         private final URL url;
  47         private volatile IOException ioe;




   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 /* @test
  25  * @bug 8004502
  26  * @summary Sanity check that NTLM will not be selected by the http protocol
  27  *    handler when running on a profile that does not support NTLM
  28  * @modules java.base/sun.net.www
  29  * @run main/othervm NoNTLM
  30  */
  31 
  32 import java.net.*;
  33 import java.io.*;
  34 import sun.net.www.MessageHeader;
  35 
  36 public class NoNTLM {
  37 
  38     static final String CRLF = "\r\n";
  39 
  40     static final String OKAY =
  41         "HTTP/1.1 200" + CRLF +
  42         "Content-Length: 0" + CRLF +
  43         "Connection: close" + CRLF +
  44         CRLF;
  45 
  46     static class Client implements Runnable {
  47         private final URL url;
  48         private volatile IOException ioe;


< prev index next >