seancribbs/webmachine-ruby — pull request #83 by seancribbs (2012-12-16 20:00:13+00:00)
Title: Add support for IO response bodies

This pull-request addresses #61. (Currently still WIP but looking for comments/contributions from others.)

Complete:

* Supports IO objects as return values from body-producing resource methods.
* Uses fixed content-length when the IO size is known and no compressions/encodings are applied (i.e. responds to `#stat`).
* Moves streaming encoders to their own module namespace and reifies the parent class (moving away from a Struct).

TODO:

* Make special cases for IOEncoder as appropriate in the adapters.
* Optimize for `IO::copy_stream` as much as possible. This includes returning real IO objects where possible.