RFR: 8209137: Add ability to bind to specific local address to HTTP client [v4]

Jaikiran Pai jpai at openjdk.java.net
Mon Jan 3 04:34:57 UTC 2022


> This change proposes to implement the enhancement noted in https://bugs.openjdk.java.net/browse/JDK-8209137.
> 
> The change introduces a new API to allow applications to build a `java.net.http.HTTPClient` configured with a specific local address that will be used while creating `Socket`(s) for connections.

Jaikiran Pai has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 17 additional commits since the last revision:

 - Merge latest master branch
 - Merge latest from master branch
 - add a security manager test to verify proper permission checks happen when local address is configured on HTTPClient
 - Merge latest from master branch
 - add a note to the javadoc of the new API to explain that calling localAddress() is only for advanced usages
 - move the security checks to the HttpClient itself instead of the builder
 - first round of security manager checks
 - use IPSupport in test and don't rely on ipv4/ipv6 being available
 - use correct IPv6 "any address"
 - Refactor the test to use the HttpServerAdapters test infrastructure
 - ... and 7 more: https://git.openjdk.java.net/jdk/compare/7aa67031...e2fd98c0

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6690/files
  - new: https://git.openjdk.java.net/jdk/pull/6690/files/b7a894c4..e2fd98c0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6690&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6690&range=02-03

  Stats: 6359 lines in 262 files changed: 4655 ins; 896 del; 808 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6690.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6690/head:pull/6690

PR: https://git.openjdk.java.net/jdk/pull/6690


More information about the net-dev mailing list