Re: RFR 8163561, add a test for Proxy Authentication in HTTP/2 Client API

2016-08-26 Thread Chris Hegarty

> On 19 Aug 2016, at 10:38, Felix Yang  wrote:
> 
> Hi Chris,
> 
>thanks for the comments. Updated webrev:
> 
> http://cr.openjdk.java.net/~xiaofeya/8163561/webrev.01/ 
> 

Looks good. Thanks Felix.

-Chris.

> 
> Thanks,
> Felix
> On 2016/8/18 23:43, Chris Hegarty wrote:
>> On 18 Aug 2016, at 10:26, Felix Yang  wrote:
>>> Hi all,
>>> 
>>>please review a new test, which tries to verify "Proxy-Authenticate" 
>>> header can be handled correctly.
>>> 
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8163561
>>> 
>>> Webrev: http://cr.openjdk.java.net/~xiaofeya/8163561/webrev.00/
>> Thank you Felix, this mainly looks good. Just some small comments:
>> 
>> 1) You do not need the serverReady latch. Once MyProxy is created it is ok
>> for the client to initiate a connection before the thread has started 
>> running.
>> The ServerSocket is already created and listening.
>> 
>> 2) authLatch could be replaced with a volatile boolean, since the 
>> authenticator
>> is guaranteed ( if there is no bug ) to be called before the 
>> CompletableFuture
>> of HttpResponse.
>> 
>> 3) In MyProxy please line up the AutoCloseables underneath each other.
>> 
>> 4) Authenticator.setDefault(auth); is not needed, right?
>> 
>> -Chris.
> 



Re: HTTP client API

2016-08-26 Thread Martin Buchholz
I don't know much about http, but I believe those who say that it's very
hard to get the API right.  Perhaps it would be best to deliver a http
client library as an independent beta package for use with jdk 8+ with a
final version becoming part of jdk 10?  Perhaps there can be a productive
collaboration here with companies for which http is bread-n-butter?

As a precedent, jsr166 historically released independent jars in this way
in the jsr166* packages
http://gee.cs.oswego.edu/dl/concurrency-interest/index.html