Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
karsonto committed Jan 18, 2024
1 parent 3b74f5b commit b6a1ad4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void exec(ChannelHandlerContext ctx, HttpRequest httpRequest) {
ctx.writeAndFlush(HttpResponseUtils.createInternalServerError()).addListener(ChannelFutureListener.CLOSE);
}
} else {
ctx.writeAndFlush(HttpResponseUtils.create404NotFound()).addListener(ChannelFutureListener.CLOSE);
ctx.writeAndFlush(HttpResponseUtils.createNotFound()).addListener(ChannelFutureListener.CLOSE);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ public static HttpResponse createInternalServerError() {
return new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.INTERNAL_SERVER_ERROR);
}

public static HttpResponse create404NotFound() {
return new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_FOUND);
}

private static ByteBuf createByteBuf(ChannelHandlerContext ctx, String body) {
byte[] bytes = body.getBytes(Constants.DEFAULT_CHARSET);
ByteBuf byteBuf = ctx.alloc().buffer(bytes.length);
Expand Down

0 comments on commit b6a1ad4

Please sign in to comment.