Skip to content

Commit

Permalink
support handle empty response and upgrade version to 1.6.11-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
linxin committed Nov 26, 2024
1 parent 131099d commit c24248c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alipay.sofa</groupId>
<artifactId>bolt</artifactId>
<version>1.6.10</version>
<version>1.6.11-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ public void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) thro
header = new byte[headerLen];
in.readBytes(header);
}
if (contentLen > 0) {
if (contentLen == 0) {
content = new byte[0];
} else if (contentLen > 0) {
content = new byte[contentLen];
in.readBytes(content);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ public void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) thro
header = new byte[headerLen];
in.readBytes(header);
}
if (contentLen == 0) {
content = new byte[0];
}
if (contentLen > 0) {
content = new byte[contentLen];
in.readBytes(content);
Expand Down

0 comments on commit c24248c

Please sign in to comment.