diff --git a/ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/http2/NettyHttp2Handler.kt b/ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/http2/NettyHttp2Handler.kt index dd89ce83392..84ab6dac3f0 100644 --- a/ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/http2/NettyHttp2Handler.kt +++ b/ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/http2/NettyHttp2Handler.kt @@ -100,6 +100,9 @@ internal class NettyHttp2Handler( val codec = channel.parent().pipeline().get(Http2MultiplexCodec::class.java)!! val connection = codec.connection() + if (!connection.remote().allowPushTo()) { + return + } val rootContext = channel.parent().pipeline().lastContext()