Skip to content

Preserve streaming body terminal errors - #116

Open
samuel-williams-shopify wants to merge 1 commit into
mainfrom
body-terminal-semantics
Open

Preserve streaming body terminal errors#116
samuel-williams-shopify wants to merge 1 commit into
mainfrom
body-terminal-semantics

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve queued chunks before surfacing producer-side terminal errors
  • make body completion first-terminal-result-wins so later closure cannot poison clean EOF
  • keep IO#close zero-argument while using an explicit close_with_error(error) capability for error-aware body streams
  • detach Reader bodies after failed consumption and add lifecycle regression coverage

This establishes the transport-neutral body semantics needed to distinguish HTTP/2 END_STREAM completion from RST_STREAM cancellation in HTTP/1 <-> HTTP/2 proxies. The explicit error-close capability avoids method-arity probing and prevents a streaming failure from being translated into a clean HTTP/2 END_STREAM.

Testing

  • full protocol-http suite: 780 tests, 1,584 assertions
  • RuboCop on all changed files
  • documentation coverage: 470/470 public definitions
  • git diff --check

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