RFR: 8263442: Potential bug in jdk.internal.net.http.common.Utils.CONTEXT_RESTRICTED [v3]

Michael McMahon michaelm at openjdk.java.net
Tue Mar 23 11:52:42 UTC 2021


On Tue, 23 Mar 2021 11:06:16 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Michael McMahon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated test to test proxy authorization
>
> test/jdk/java/net/httpclient/AuthFilter.java line 145:
> 
>> 143:         if (useProxy) {
>> 144:             proxy = new ProxyServer();
>> 145:             proxyAddr = new InetSocketAddress("127.0.0.1", proxy.getPort());
> 
> Maybe the test should be guarded in case the machine is IPv6 only

Okay, will fix that too.

> test/jdk/java/net/httpclient/AuthFilter.java line 160:
> 
>> 158:         if (useProxy) {
>> 159:             builder.proxy(ProxySelector.of(proxyAddr));
>> 160:         }
> 
> You should probably set NO_PROXY otherwise to avoid the default proxy selector on mac.

For the non-proxy case? Good idea.

Regarding the question above about the `-Djdk.http.auth.proxying.disabledSchemes=""` setting. The test fails for both server and proxy auth without this change (and without having to set that property).

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

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


More information about the net-dev mailing list