You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2025/01/03 14:54:16 UTC
(httpcomponents-core) branch 5.3.x updated: Minor performance optimization in handling of HEAD requests by the H2 transport
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch 5.3.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
The following commit(s) were added to refs/heads/5.3.x by this push:
new e3f7f02bf Minor performance optimization in handling of HEAD requests by the H2 transport
e3f7f02bf is described below
commit e3f7f02bf93269e9483f3f6be86ae9a112fc0f52
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Fri Jan 3 15:48:06 2025 +0100
Minor performance optimization in handling of HEAD requests by the H2 transport
---
.../java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java
index b754e8e67..9e7fcf6ff 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java
@@ -179,7 +179,7 @@ class ServerH2StreamHandler implements H2StreamHandler {
(receivedRequest != null && Method.HEAD.isSame(receivedRequest.getMethod()));
outputChannel.submit(responseHeaders, endStream);
connMetrics.incrementResponseCount();
- if (responseEntityDetails == null) {
+ if (endStream) {
responseState = MessageState.COMPLETE;
} else {
responseState = MessageState.BODY;