Skip to content

Commit

Permalink
Document rewind behavior change of rack input.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Jan 31, 2024
1 parent e50b72a commit f63f059
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion UPGRADE-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ dropped entirely.
Previously, `rack.input` was required to be rewindable, i.e. `io.seek(0)` but
this was only generally possible with a file based backing, which prevented
efficient streaming of request bodies. Now, `rack.input` is not required to be
rewindable.
rewindable. Use `Rack::RewindableInput::Middleware` to make the body rewindable.

### `rack.input` is no longer rewound after being consumed

Previously, `rack.input` was always rewindable, and `.rewind` was called after
consuming form or multipart data. Call `.rewind` explicitly to consume input
a second time.

## Response Changes

Expand Down

0 comments on commit f63f059

Please sign in to comment.