class Rack::RewindableInput

Class which can make any IO object rewindable, including non-rewindable ones. It does this by buffering the data into a tempfile, which is rewindable.

Donโ€™t forget to call close when youโ€™re done. This frees up temporary resources that RewindableInput uses, though it does not close the original IO object.