Skip to content

Respect input body rewind result - #38

Merged
samuel-williams-shopify merged 2 commits into
mainfrom
fix-input-rewind
Sep 10, 2026
Merged

Respect input body rewind result#38
samuel-williams-shopify merged 2 commits into
mainfrom
fix-input-rewind

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Protocol::Rack::Input#rewind previously ignored the result of rewinding the underlying body. This caused non-rewindable request bodies to be reported as successfully rewound and reset the input state despite the failure.

Only reset the input state when the underlying rewind succeeds, and add regression coverage confirming a failed rewind leaves the input closed.

Fixes #33.

Assisted-By: devx/b8194217-b20a-4799-b266-4910beb3ee2b
Assisted-By: devx/b8194217-b20a-4799-b266-4910beb3ee2b
@samuel-williams-shopify
samuel-williams-shopify merged commit 0b2f41d into main Sep 10, 2026
88 of 94 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the fix-input-rewind branch September 10, 2026 06:51
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.

Input#rewind returns true when the underlying body is not rewindable

1 participant