From d04dcb048b55477d5e030fc0c334bea24fcab2a9 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Wed, 2 Nov 2022 12:55:49 +0100 Subject: [PATCH] Bug fix: async HTTP/1.1 server protocol handler incorrectly increments request count upon receipt of a response message head. --- .../hc/core5/http/impl/nio/ServerHttp1StreamDuplexer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/ServerHttp1StreamDuplexer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/ServerHttp1StreamDuplexer.java index d256feffab..fafd72fc62 100644 --- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/ServerHttp1StreamDuplexer.java +++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/ServerHttp1StreamDuplexer.java @@ -244,7 +244,7 @@ void updateInputMetrics(final HttpRequest request, final BasicHttpConnectionMetr @Override void updateOutputMetrics(final HttpResponse response, final BasicHttpConnectionMetrics connMetrics) { if (response.getCode() >= HttpStatus.SC_OK) { - connMetrics.incrementRequestCount(); + connMetrics.incrementResponseCount(); } }