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 authored Nov 17, 2022
1 parent f44f7da commit 643ee02
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,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 @@ -405,8 +408,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 643ee02

Please sign in to comment.