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

Jaikiran Pai jpai at openjdk.java.net
Mon Apr 11 01:40:33 UTC 2022


On Mon, 4 Apr 2022 09:53:02 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> 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 31 additional commits since the last revision:
> 
>  - Add a unit test for the new HttpClient.Builder.localAddress method
>  - Implement Daniel's suggestion - only support InetSocketAddress with port 0
>  - Merge latest from master branch
>  - Merge latest from master branch
>  - merge latest from master branch
>  - Merge latest from master branch
>  - Merge latest changes from master branch
>  - fix javadoc to mention HttpClient instead of HTTPClient
>  - minor - rename variable in test
>  - Merge latest from master branch
>  - ... and 21 more: https://git.openjdk.java.net/jdk/compare/65123e9d...0748badc

> I'd suggest HttpClientLocalAddrTest implements HttpServerAdapters like other tests do.

Done. Updated the PR to implement the `HttpServerAdapters`.

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

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


More information about the net-dev mailing list