diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerUpgradeHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerUpgradeHandler.java index 691d37e767..1c9f8cda85 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerUpgradeHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerUpgradeHandler.java @@ -70,14 +70,9 @@ public class HttpServerUpgradeHandler extends HttpObjectAggregator { * adding all handlers required for the new protocol. * * @param ctx the context for the current handler. - * @param upgradeRequest the request that triggered the upgrade to this protocol. The - * upgraded protocol is responsible for sending the response. - * @param upgradeResponse a 101 Switching Protocols response that is populated with the - * {@link HttpHeaderNames#CONNECTION} and {@link HttpHeaderNames#UPGRADE} headers. - * The protocol is required to send this before sending any other frames back to the client. - * The headers may be augmented as necessary by the protocol before sending. + * @param upgradeRequest the request that triggered the upgrade to this protocol. */ - void upgradeTo(ChannelHandlerContext ctx, FullHttpRequest upgradeRequest, FullHttpResponse upgradeResponse); + void upgradeTo(ChannelHandlerContext ctx, FullHttpRequest upgradeRequest); } /** @@ -320,7 +315,7 @@ public class HttpServerUpgradeHandler extends HttpObjectAggregator { if (future.isSuccess()) { // Perform the upgrade to the new protocol. sourceCodec.upgradeFrom(ctx); - finalUpgradeCodec.upgradeTo(ctx, request, upgradeResponse); + finalUpgradeCodec.upgradeTo(ctx, request); // Notify that the upgrade has occurred. Retain the event to offset // the release() in the finally block. diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ServerUpgradeCodec.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ServerUpgradeCodec.java index fa00076ad7..3382fc2938 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ServerUpgradeCodec.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ServerUpgradeCodec.java @@ -98,8 +98,7 @@ public class Http2ServerUpgradeCodec implements HttpServerUpgradeHandler.Upgrade } @Override - public void upgradeTo(final ChannelHandlerContext ctx, FullHttpRequest upgradeRequest, - FullHttpResponse upgradeResponse) { + public void upgradeTo(final ChannelHandlerContext ctx, FullHttpRequest upgradeRequest) { // Add the HTTP/2 connection handler to the pipeline immediately following the current handler. ctx.pipeline().addAfter(ctx.name(), handlerName, connectionHandler); }