diff --git a/reactive/webserver/webserver/src/main/java/io/helidon/reactive/webserver/ForwardingHandler.java b/reactive/webserver/webserver/src/main/java/io/helidon/reactive/webserver/ForwardingHandler.java index 55c02b34a8e..8062051a836 100644 --- a/reactive/webserver/webserver/src/main/java/io/helidon/reactive/webserver/ForwardingHandler.java +++ b/reactive/webserver/webserver/src/main/java/io/helidon/reactive/webserver/ForwardingHandler.java @@ -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 { @@ -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);