Skip to content

Settle HTTP response enqueue failures - #30

Merged
kentbull merged 1 commit into
release/v0.6.20from
fix/http-enqueue-failure-settlement-v0.6.20
Aug 29, 2026
Merged

kentbull merged 1 commit into
release/v0.6.20from
fix/http-enqueue-failure-settlement-v0.6.20

Conversation

@kentbull

@kentbull kentbull commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • abort when ordinary body output or a generator return value cannot be enqueued
  • abort when a rendered HTTPError or terminal chunk cannot be enqueued
  • retain the transport failure, close the WSGI application result exactly once, and preserve queued bytes
  • cover all four paths with a real tcp.Remoter send shutdown

Why

Producer exhaustion or a declared Content-Length is not proof that an HTTP response reached the transport queue. write() may update response state before enqueue fails, so allowing control to continue can report normal completion for bytes that were never accepted. Enqueue failure must instead become the terminal cause, with no synthesized framing or responder reuse.

Tracks ioflo#194. The generic upstream port is deferred behind ioflo#179, ioflo#181, ioflo#191, ioflo#192, and ioflo#193. Real txCutoff integration remains release-branch transport work.

Abort response production when body output, generator return values, rendered HTTP errors, or terminal chunk framing cannot be accepted by the transport queue.

Retain the enqueue failure as the terminal cause and prevent fixed-length byte accounting or producer exhaustion from falsely reporting normal completion.
@kentbull
kentbull merged commit 383fc15 into release/v0.6.20 Aug 29, 2026
6 checks passed
@kentbull
kentbull deleted the fix/http-enqueue-failure-settlement-v0.6.20 branch August 29, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant