RFR: 8087124 HTTP/2 implementation

Michael McMahon michael.x.mcmahon at oracle.com
Wed Apr 6 16:23:52 UTC 2016


John,

It is not necessary to have access to the frames themselves to achieve this.
At the API level, in the HttpResponse.MultiProcessor type the onStart() 
method
returns a BiFunction that is called for each incoming push promise. The 
implementation
of that function (which is supplied by the user) must return true or 
false depending
on whether the push is to be accepted or canceled. If it is canceled then
a RST_STREAM frame is sent to do the cancellation.

I need to add a test for that scenario though. So, thanks for raising 
the point.

Michael

On 06/04/16 16:42, John Jiang wrote:
> Hi Michael,
> All of HTTP/2 frame types aren't public APIs, then is there any way to 
> handle HTTP/2 at lower level?
> For example, how to cancel server push? In theory, the client should 
> send a RST_STREAM frame with error code REFUSED_STREAM or CANCEL to 
> the server.
>
> Best regards,
> John Jiang
>
> On 2016/4/6 22:08, Michael McMahon wrote:
>> Hi,
>>
>> This is the webrev for the HTTP/2 part of JEP 110.
>>
>> http://cr.openjdk.java.net/~michaelm/8087124/webrev.1/index.html
>>
>> There are minor changes to existing classes as well as the bulk
>> of the new stuff in the new files. Most of the HTTP/2 implementation
>> is in the files:
>>
>> || src/java.httpclient/share/classes/java/net/http/Http2Connection.java
>> || src/java.httpclient/share/classes/java/net/http/Stream.java
>>
>> Each of the HTTP/2 frame types also has its own class derived from
>> Http2Frame.
>>
>> The hpack code will be reviewed in a separate review to be
>> circulated today by Pavel.
>>
>> I realise there were comments a few weeks ago on the Http/1 code
>> which I haven't gotten back to. Once all of this code is integrated
>> I will return to fixing up issues across the whole implementation,
>> and some API issues will also be revisited.
>>
>> Thanks,
>> Michael
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20160406/fa05e297/attachment.html>


More information about the net-dev mailing list