diff options
author | Tobias Thierer <tobiast@google.com> | 2016-11-17 18:12:19 +0000 |
---|---|---|
committer | Tobias Thierer <tobiast@google.com> | 2016-11-18 15:13:32 +0000 |
commit | 6d6d62884291d2f45dba1e33e4d63a0567668e07 (patch) | |
tree | 3f27a0bd8404bd173aa9b2801260a0e072ddaa18 | |
parent | 1f9933397eb3374355bc3e4c6c041a949d40050a (diff) |
HttpURLConnection: Don't claim that connection pooling is configurable.
HttpURLConnection's documentation claimed that connection pooling
can be configured by setting system properties http.keepAlive and
http.maxConnections.
This is not currently supported on Android because
ConfigAwareConnectionPool.<clinit> reads these system properties
only once, before an application has a chance to change them.
Therefore this CL removes the incorrect documentation. Potentially
a follow-up CL could add this feature to Android and reintroduce
the documentation.
Test: Verified in the source code that these system properties
are still read during ConfigAwareConnectionPool.<clinit>
rather than each time a HttpUrlConnection is constructed.
I haven't empirically verified the observed behavior from
b/22444627.
Bug: 22444627
Bug: 28808791
Change-Id: Ifc1e2bc167d0b87da01f31cd2bad23aba454037b
-rw-r--r-- | ojluni/src/main/java/java/net/HttpURLConnection.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ojluni/src/main/java/java/net/HttpURLConnection.java b/ojluni/src/main/java/java/net/HttpURLConnection.java index 53137aadfa..db05c5f2ac 100644 --- a/ojluni/src/main/java/java/net/HttpURLConnection.java +++ b/ojluni/src/main/java/java/net/HttpURLConnection.java @@ -30,6 +30,7 @@ import java.io.IOException; import java.security.Permission; import java.util.Date; +// Android-changed: top-level documentation substantially changed/rewritten. /** * A URLConnection with support for HTTP-specific features. See * <A HREF="http://www.w3.org/pub/WWW/Protocols/"> the spec </A> for @@ -136,10 +137,7 @@ import java.util.Date; * <p>To reduce latency, this class may reuse the same underlying {@code Socket} * for multiple request/response pairs. As a result, HTTP connections may be * held open longer than necessary. Calls to {@link #disconnect()} may return - * the socket to a pool of connected sockets. This behavior can be disabled by - * setting the {@code http.keepAlive} system property to {@code false} before - * issuing any HTTP requests. The {@code http.maxConnections} property may be - * used to control how many idle connections to each server will be held. + * the socket to a pool of connected sockets. * * <p>By default, this implementation of {@code HttpURLConnection} requests that * servers use gzip compression and it automatically decompresses the data for |