mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8197564: HTTP Client implementation
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com> Co-authored-by: Michael McMahon <michael.x.mcmahon@oracle.com> Co-authored-by: Pavel Rappo <pavel.rappo@oracle.com> Reviewed-by: chegar, dfuchs, michaelm, prappo
This commit is contained in:
parent
a9234c0ab6
commit
a3b61fd4c7
398 changed files with 37643 additions and 10897 deletions
|
@ -36,9 +36,9 @@ import sun.security.util.SecurityConstants;
|
|||
* handler. The HTTP state management mechanism specifies a way to
|
||||
* create a stateful session with HTTP requests and responses.
|
||||
*
|
||||
* <p>A system-wide CookieHandler that to used by the HTTP protocol
|
||||
* handler can be registered by doing a
|
||||
* CookieHandler.setDefault(CookieHandler). The currently registered
|
||||
* <p> A system-wide CookieHandler to be used by the {@linkplain
|
||||
* HttpURLConnection HTTP URL stream protocol handler} can be registered by
|
||||
* doing a CookieHandler.setDefault(CookieHandler). The currently registered
|
||||
* CookieHandler can be retrieved by calling
|
||||
* CookieHandler.getDefault().
|
||||
*
|
||||
|
|
|
@ -156,7 +156,7 @@ of proxies.</P>
|
|||
checked only once at startup.</P>
|
||||
</UL>
|
||||
<a id="MiscHTTP"></a>
|
||||
<H2>Misc HTTP properties</H2>
|
||||
<H2>Misc HTTP URL stream protocol handler properties</H2>
|
||||
<UL>
|
||||
<LI><P><B>http.agent</B> (default: “Java/<version>”)<BR>
|
||||
Defines the string sent in the User-Agent request header in http
|
||||
|
|
|
@ -121,8 +121,8 @@
|
|||
* underlying protocol handlers like http or https.</li>
|
||||
* <li>{@link java.net.HttpURLConnection} is a subclass of URLConnection
|
||||
* and provides some additional functionalities specific to the
|
||||
* HTTP protocol. This API has been superceded by the newer
|
||||
HTTP client API described in the previous section.</li>
|
||||
* HTTP protocol. This API has been superseded by the newer
|
||||
* {@linkplain java.net.http HTTP Client API}.</li>
|
||||
* </ul>
|
||||
* <p>The recommended usage is to use {@link java.net.URI} to identify
|
||||
* resources, then convert it into a {@link java.net.URL} when it is time to
|
||||
|
|
|
@ -171,7 +171,7 @@ module java.base {
|
|||
jdk.attach,
|
||||
jdk.charsets,
|
||||
jdk.compiler,
|
||||
jdk.incubator.httpclient,
|
||||
java.net.http,
|
||||
jdk.jdeps,
|
||||
jdk.jlink,
|
||||
jdk.jshell,
|
||||
|
@ -204,12 +204,11 @@ module java.base {
|
|||
jdk.internal.jvmstat;
|
||||
exports jdk.internal.vm.annotation to
|
||||
jdk.unsupported,
|
||||
jdk.internal.vm.ci,
|
||||
jdk.incubator.httpclient;
|
||||
jdk.internal.vm.ci;
|
||||
exports jdk.internal.util.jar to
|
||||
jdk.jartool;
|
||||
exports sun.net to
|
||||
jdk.incubator.httpclient,
|
||||
java.net.http,
|
||||
jdk.naming.dns;
|
||||
exports sun.net.ext to
|
||||
jdk.net;
|
||||
|
@ -219,10 +218,10 @@ module java.base {
|
|||
exports sun.net.util to
|
||||
java.desktop,
|
||||
jdk.jconsole,
|
||||
jdk.incubator.httpclient;
|
||||
java.net.http;
|
||||
exports sun.net.www to
|
||||
java.desktop,
|
||||
jdk.incubator.httpclient,
|
||||
java.net.http,
|
||||
jdk.jartool;
|
||||
exports sun.net.www.protocol.http to
|
||||
java.security.jgss;
|
||||
|
|
|
@ -14,6 +14,23 @@ grant codeBase "jrt:/java.compiler" {
|
|||
};
|
||||
|
||||
|
||||
grant codeBase "jrt:/java.net.http" {
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.net";
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.util";
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www";
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.misc";
|
||||
permission java.net.SocketPermission "*","connect,resolve";
|
||||
permission java.net.URLPermission "http:*","*:*";
|
||||
permission java.net.URLPermission "https:*","*:*";
|
||||
permission java.net.URLPermission "ws:*","*:*";
|
||||
permission java.net.URLPermission "wss:*","*:*";
|
||||
permission java.net.URLPermission "socket:*","CONNECT"; // proxy
|
||||
// For request/response body processors, fromFile, asFile
|
||||
permission java.io.FilePermission "<<ALL FILES>>","read,write,delete";
|
||||
permission java.util.PropertyPermission "*","read";
|
||||
permission java.net.NetPermission "getProxySelector";
|
||||
};
|
||||
|
||||
grant codeBase "jrt:/java.scripting" {
|
||||
permission java.security.AllPermission;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue