equal
deleted
inserted
replaced
27 * @summary Check that HttpURLConnection.getResponseCode returns -1 for |
27 * @summary Check that HttpURLConnection.getResponseCode returns -1 for |
28 * malformed status-lines in the http response. |
28 * malformed status-lines in the http response. |
29 */ |
29 */ |
30 import java.net.*; |
30 import java.net.*; |
31 import java.io.*; |
31 import java.io.*; |
|
32 import static java.net.Proxy.NO_PROXY; |
32 |
33 |
33 public class Responses { |
34 public class Responses { |
34 |
35 |
35 /* |
36 /* |
36 * Test cases :- |
37 * Test cases :- |
147 |
148 |
148 System.out.println("******************"); |
149 System.out.println("******************"); |
149 System.out.println("Test with response: >" + tests[i][0] + "<"); |
150 System.out.println("Test with response: >" + tests[i][0] + "<"); |
150 |
151 |
151 URL url = new URL("http://" + authority + "/" + i); |
152 URL url = new URL("http://" + authority + "/" + i); |
152 HttpURLConnection http = (HttpURLConnection)url.openConnection(); |
153 HttpURLConnection http = (HttpURLConnection)url.openConnection(NO_PROXY); |
153 |
154 |
154 try { |
155 try { |
155 |
156 |
156 // test getResponseCode |
157 // test getResponseCode |
157 // |
158 // |