Skip to content

Commit

Permalink
NullPointerException when there is an illegal character in the request (
Browse files Browse the repository at this point in the history
  • Loading branch information
klustria committed Nov 18, 2022
1 parent f2d018d commit d888c52
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ private boolean channelReadHttpRequest(ChannelHandlerContext ctx, Context reques
// New request ID
long requestId = REQUEST_ID_GENERATOR.incrementAndGet();


requestEntityAnalyzed = new CompletableFuture<>();

// If a problem with the request URI, return 400 response
BareRequestImpl bareRequest;
try {
Expand Down Expand Up @@ -395,8 +398,6 @@ private boolean channelReadHttpRequest(ChannelHandlerContext ctx, Context reques
prevRequestFuture = null;
}

requestEntityAnalyzed = new CompletableFuture<>();

//If the keep alive is not set, we know we will be closing the connection
if (!HttpUtil.isKeepAlive(requestContext.request())) {
this.requestEntityAnalyzed.complete(ChannelFutureListener.CLOSE);
Expand Down

0 comments on commit d888c52

Please sign in to comment.