diff --git a/src/main/java/org/opensearch/security/ssl/http/netty/Netty4HttpRequestHeaderVerifier.java b/src/main/java/org/opensearch/security/ssl/http/netty/Netty4HttpRequestHeaderVerifier.java index 9afd6b0e22..ed06f312b6 100644 --- a/src/main/java/org/opensearch/security/ssl/http/netty/Netty4HttpRequestHeaderVerifier.java +++ b/src/main/java/org/opensearch/security/ssl/http/netty/Netty4HttpRequestHeaderVerifier.java @@ -30,13 +30,12 @@ import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; -import io.netty.handler.codec.http.DefaultHttpRequest; import io.netty.handler.codec.http.HttpRequest; import io.netty.util.AttributeKey; import io.netty.util.ReferenceCountUtil; @Sharable -public class Netty4HttpRequestHeaderVerifier extends SimpleChannelInboundHandler { +public class Netty4HttpRequestHeaderVerifier extends SimpleChannelInboundHandler { public static final AttributeKey IS_AUTHENTICATED = AttributeKey.newInstance("opensearch-http-is-authenticated"); public static final AttributeKey SHOULD_DECOMPRESS = AttributeKey.newInstance("opensearch-http-should-decompress"); public static final AttributeKey CONTEXT_TO_RESTORE = AttributeKey.newInstance( @@ -67,7 +66,7 @@ public Netty4HttpRequestHeaderVerifier(SecurityRestFilter restFilter, ThreadPool } @Override - public void channelRead0(ChannelHandlerContext ctx, DefaultHttpRequest msg) throws Exception { + public void channelRead0(ChannelHandlerContext ctx, HttpRequest msg) throws Exception { // DefaultHttpRequest should always be first and contain headers ReferenceCountUtil.retain(msg);