Skip to content

Commit bb63f07

Browse files
committed
Minor performance optimization in handling of HEAD requests by the H2 transport
1 parent 5b748d0 commit bb63f07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2StreamHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private void commitResponse(
179179
receivedRequest != null && Method.HEAD.isSame(receivedRequest.getMethod());
180180
outputChannel.submit(responseHeaders, endStream);
181181
connMetrics.incrementResponseCount();
182-
if (responseEntityDetails == null) {
182+
if (endStream) {
183183
responseState = MessageState.COMPLETE;
184184
} else {
185185
responseState = MessageState.BODY;

0 commit comments

Comments
 (0)