9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 */
24
25 /*
26 * @test
27 * @bug 8163561
28 * @modules java.base/sun.net.www
29 * @summary Verify that Proxy-Authenticate header is correctly handled
30 *
31 * @run main/othervm ProxyAuthTest
32 */
33
34 import java.io.BufferedWriter;
35 import java.io.IOException;
36 import java.io.InputStream;
37 import java.io.OutputStream;
38 import java.io.OutputStreamWriter;
39 import java.io.PrintWriter;
40 import java.net.Authenticator;
41 import java.net.InetSocketAddress;
42 import java.net.PasswordAuthentication;
43 import java.net.ProxySelector;
44 import java.net.ServerSocket;
45 import java.net.Socket;
46 import java.net.URI;
47 import java.net.http.HttpClient;
48 import java.net.http.HttpResponse;
|
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 */
24
25 /*
26 * @test
27 * @bug 8163561
28 * @modules java.base/sun.net.www
29 * java.httpclient
30 * @summary Verify that Proxy-Authenticate header is correctly handled
31 *
32 * @run main/othervm ProxyAuthTest
33 */
34
35 import java.io.BufferedWriter;
36 import java.io.IOException;
37 import java.io.InputStream;
38 import java.io.OutputStream;
39 import java.io.OutputStreamWriter;
40 import java.io.PrintWriter;
41 import java.net.Authenticator;
42 import java.net.InetSocketAddress;
43 import java.net.PasswordAuthentication;
44 import java.net.ProxySelector;
45 import java.net.ServerSocket;
46 import java.net.Socket;
47 import java.net.URI;
48 import java.net.http.HttpClient;
49 import java.net.http.HttpResponse;
|