netty5/codec-http2/src
Bryce Anderson b309271e49 HttpServerUpgradeHandler shouldn't wait for flush to reshape pipeline
Motivation:

There is a race between both flushing the upgrade response and receiving
more data before the flush ChannelPromise can fire and reshape the
pipeline. Since We have already committed to an upgrade by writing the
upgrade response, we need to be immediately prepared for handling the
next protocol.

Modifications:

The pipeline reshaping logic in HttpServerUpgradeHandler has been moved
out of the ChannelFutureListener attached to the write of the upgrade
response and happens immediately after the writeAndFlush call, but
before the method returns.

Result:

The pipeline is no longer subject to receiving more data before the
pipeline has been reformed.
2018-03-28 19:54:30 +02:00
..
main/java/io/netty/handler/codec/http2 Correctly include the stream id when convert from Http2HeadersFrame to HttpMessage 2018-03-17 09:46:01 +01:00
test HttpServerUpgradeHandler shouldn't wait for flush to reshape pipeline 2018-03-28 19:54:30 +02:00