author | chegar |
Wed, 07 Feb 2018 22:09:31 +0000 | |
branch | http-client-branch |
changeset 56093 | 22d94c4a3641 |
parent 56092 | fd85b2bf2b0d |
child 56423 | ba64c30666cc |
permissions | -rw-r--r-- |
56054
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
1 |
/* |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
2 |
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
4 |
* |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
8 |
* |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
13 |
* accompanied this code). |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
14 |
* |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
18 |
* |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
21 |
* questions. |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
22 |
*/ |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
23 |
|
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
24 |
/** |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
25 |
* @test |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
26 |
* @summary this test verifies that a client may provides authorization |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
27 |
* headers directly when connecting with a server, and |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
28 |
* it verifies that the client honor the jdk.http.auth.*.disabledSchemes |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
29 |
* net properties. |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
30 |
* @bug 8087112 |
56070
66a9c3185028
http-client-branch: add tests with an HTTP/2 server for custom basic and digest authentication
dfuchs
parents:
56054
diff
changeset
|
31 |
* @library /lib/testlibrary http2/server |
56093 | 32 |
* @build jdk.testlibrary.SimpleSSLContext DigestEchoServer DigestEchoClient |
33 |
* ProxyAuthDisabledSchemes |
|
56092
fd85b2bf2b0d
http-client-branch: move implementation to jdk.internal.net.http
chegar
parents:
56089
diff
changeset
|
34 |
* @modules java.net.http/jdk.internal.net.http.common |
fd85b2bf2b0d
http-client-branch: move implementation to jdk.internal.net.http
chegar
parents:
56089
diff
changeset
|
35 |
* java.net.http/jdk.internal.net.http.frame |
fd85b2bf2b0d
http-client-branch: move implementation to jdk.internal.net.http
chegar
parents:
56089
diff
changeset
|
36 |
* java.net.http/jdk.internal.net.http.hpack |
56070
66a9c3185028
http-client-branch: add tests with an HTTP/2 server for custom basic and digest authentication
dfuchs
parents:
56054
diff
changeset
|
37 |
* java.logging |
66a9c3185028
http-client-branch: add tests with an HTTP/2 server for custom basic and digest authentication
dfuchs
parents:
56054
diff
changeset
|
38 |
* java.base/sun.net.www.http |
56054
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
39 |
* java.base/sun.net.www |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
40 |
* java.base/sun.net |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
41 |
* @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=Basic,Digest |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
42 |
* -Djdk.http.auth.tunneling.disabledSchemes=Digest,Basic |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
43 |
* ProxyAuthDisabledSchemes |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
44 |
* @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=Basic |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
45 |
* -Djdk.http.auth.tunneling.disabledSchemes=Basic |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
46 |
* ProxyAuthDisabledSchemes CLEAR PROXY |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
47 |
* @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=Digest |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
48 |
* -Djdk.http.auth.tunneling.disabledSchemes=Digest |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
49 |
* ProxyAuthDisabledSchemes CLEAR PROXY |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
50 |
*/ |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
51 |
|
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
52 |
public class ProxyAuthDisabledSchemes { |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
53 |
public static void main(String[] args) throws Exception { |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
54 |
DigestEchoClient.main(args); |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
55 |
} |
352e845ae744
http-client-branch: honor legacy jdk.http.auth.* property when handling proxy-authorization
dfuchs
parents:
diff
changeset
|
56 |
} |