Skip to content

Commit

Permalink
HBASE-26170 handleTooBigRequest in NettyRpcServer didn't skip enough …
Browse files Browse the repository at this point in the history
…bytes
  • Loading branch information
sunhelly committed Aug 5, 2021
1 parent 2e9ab3c commit ee6db32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out)
NettyRpcServer.LOG.warn(requestTooBigMessage);

if (connection.connectionHeaderRead) {
in.skipBytes(FRAME_LENGTH_FIELD_LENGTH);
handleTooBigRequest(in);
return;
}
Expand All @@ -107,6 +106,7 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out)
}

private void handleTooBigRequest(ByteBuf in) throws IOException {
in.skipBytes(FRAME_LENGTH_FIELD_LENGTH);
in.markReaderIndex();
int preIndex = in.readerIndex();
int headerSize = readRawVarint32(in);
Expand Down

0 comments on commit ee6db32

Please sign in to comment.