matadon/mizuno — pull request #35 by azell (2012-12-27 05:22:54+00:00)
Title: Rewindable

This is for https://github.com/matadon/mizuno/issues/32: providing rewind semantics if so desired. I added a new command line flag: --rewindable.

If set to true, the server will provide Rack 1.x rewind semantics. For testing, I created a new endpoint in the test_app. The endpoint is exercised by rewindable_input_stream_spec.rb, which caused me to refactor the server code in server_spec.rb.

The hash look-up in the server code could be avoided by wiring in an instance defining the Rack strategy. I left this out for now.