Conversation
Collaborator
|
Review requested:
|
ronag
force-pushed
the
http2-compat-head-close
branch
from
September 26, 2026 10:53
6f1a425 to
3e43327
Compare
The compat response defers 'finish' and 'close' for a HEAD request until response.end(), because the stream of a headers-only response closes as soon as the headers are sent. The same deferral also applied to a HEAD stream that closed before any response was sent, for example when the client cancelled it or the session was destroyed. Nothing was left to call end(), so the response never emitted 'close' and the abort could not be observed on it. Defer only once the headers were sent, and otherwise close the response as for any other method. The writable side of a HEAD stream is finished from the start, so 'finish' is emitted only after the headers were sent, and an aborted HEAD response does not report success. Assisted-by: Opus 5.5 Signed-off-by: Robert Nagy <ronagy@icloud.com>
ronag
force-pushed
the
http2-compat-head-close
branch
from
September 26, 2026 10:53
3e43327 to
8aed10d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66310 +/- ##
=======================================
Coverage 90.37% 90.38%
=======================================
Files 790 790
Lines 274497 274505 +8
Branches 52558 52555 -3
=======================================
+ Hits 248065 248099 +34
+ Misses 16922 16883 -39
- Partials 9510 9523 +13
🚀 New features to boost your workflow:
|
jasnell
approved these changes
Sep 26, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The compat response defers 'finish' and 'close' for a HEAD request until response.end(), because the stream of a headers-only response closes as soon as the headers are sent. The same deferral also applied to a HEAD stream that closed before any response was sent, for example when the client cancelled it or the session was destroyed. Nothing was left to call end(), so the response never emitted 'close' and the abort could not be observed on it.
Defer only once the headers were sent, and otherwise close the response as for any other method. The writable side of a HEAD stream is finished from the start, so 'finish' is emitted only after the headers were sent, and an aborted HEAD response does not report success.