RFR: 8209137: Add ability to bind to specific local address to HTTP client
Jaikiran Pai
jpai at openjdk.java.net
Fri Dec 10 09:34:39 UTC 2021
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.
-------------
Commit messages:
- 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
- increase the jtreg maxOutputSize for java/net/httpclient tests
- Enhance HttpServerAdapters test infrastructure to allow returning client remote address from the (test) exchanges
- print the stacktrace, to aid debugging, from Http2TestServer when server fails to start
- ... and 4 more: https://git.openjdk.java.net/jdk/compare/aed3ea20...5ab5a61a
Changes: https://git.openjdk.java.net/jdk/pull/6690/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6690&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8209137
Stats: 427 lines in 8 files changed: 425 ins; 0 del; 2 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