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:49 UTC 2021
On Wed, 8 Dec 2021 01:22:50 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> You could also replace `Boolean.getBoolean("java.net.preferIPv6Addresses")` with a call to `IPSupport::preferIPv6Addresses()`
>
>> ::1 is the ipv6 loopback - not the ipv6 wildcard
>
> Oops, that's embarrassing and it isn't even a copy/paste mistake. I have been in this part of the test so many times while cleaning up/debugging and yet didn't notice this. Fixed it in the latest PR update now.
>
> I'll update the rest of this test with your suggestions shortly. Thank you Daniel for the reviews.
>
>
>
>>
> You may encounter some issues when testing with https and IPv6 - Michael is working on a fix to add the loopback addresses as SNI aliases to the SimpleSSLContext certificate: https://bugs.openjdk.java.net/browse/JDK-8278312
I had a look at this one. Turns out my test wasn't impacted by it because the test ends up using a hostname based URLs (`localhost`) for requests and the issue only impacts requests that use IP addresses for the requests (where the server then presents a hostname based cert causing the cert validation failure.).
-------------
PR: https://git.openjdk.java.net/jdk/pull/6690
More information about the net-dev
mailing list