Skip to content

Commit

Permalink
uri
Browse files Browse the repository at this point in the history
  • Loading branch information
martin.cong committed Oct 10, 2023
1 parent 900a62e commit 131224a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest request)
}
}

writeNotFound(ctx);
writeNotFound(ctx,uri);

}
<ParamDTO> void writeHandler(ChannelHandlerContext ctx, Handler<ParamDTO> handler, ParamDTO dto, HttpHeaders requestHeaders){
Expand Down Expand Up @@ -155,11 +155,11 @@ public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cau
ctx.close();
}

private static void writeNotFound( ChannelHandlerContext ctx) {
private static void writeNotFound( ChannelHandlerContext ctx,String uri) {

var status = HttpResponseStatus.NOT_FOUND;
writeResponse(ctx, status, TYPE_PLAIN,
("{\"code\":404,\"message\":\""+status.reasonPhrase()+"\"}").getBytes(StandardCharsets.UTF_8)
("{\"code\":404,\"message\":\""+uri+" , "+ status.reasonPhrase()+"\"}").getBytes(StandardCharsets.UTF_8)
,null);
}

Expand Down

0 comments on commit 131224a

Please sign in to comment.