Repository navigation
fix(http): abort unfinished responses without sending success - #47
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
September 30, 2026 12:19
steipete
force-pushed
the
claude/fix-http-asynchronous-abort
branch
from
October 1, 2026 06:11
40ad360 to
51eb3fe
Compare
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.
Close an unfinished HTTP connection when its request or response is destroyed asynchronously. The native abort path previously called
end_without_body(true), which could send an empty 200 response instead of aborting the exchange.Abort now delegates to the existing native HTTP socket owner. That keeps its partial-write flushing, parser-aware close, TLS shutdown, and queued-response ownership. Pending pinned writes and request references are released without marking an HTTP response successfully complete. The JS socket wrapper defers its already-closed callback through the native immediate scheduler while retaining ownership of the captured callback; this preserves Node event ordering and completion when native close notification re-enters destruction.
Validation on macOS arm64:
rust:check-all: all 12 targets pass, with no skips. Source type checking, JS lint, and formatting pass.Upstream PR/issue searches found no exact asynchronous-empty-200 fix. No upstream patch was copied.
Consumer results:
src/gateway/worker-environments/node-workspace-transfer-pack.test.tssrc/gateway/watch-node-http.test.tssrc/gateway/worker-environments/node-workspace-transfer-revocation.test.tssrc/gateway/server.portals.session.test.tsextensions/feishu/src/monitor.webhook-routing.test.tsextensions/msteams/src/monitor.webhook-lifecycle.test.ts