bullet icon indicating copy to clipboard operation
bullet copied to clipboard

Bullet::Rack doesn't comply with Rack SPEC

Open wagenet opened this issue 7 years ago • 0 comments

The Body must respond to each and must only yield String values. The Body itself should not be an instance of String, as this will break in Ruby 1.9. If the Body responds to close, it will be called after iteration. If the body is replaced by a middleware after action, the original body must be closed first, if it responds to close. If the Body responds to to_path, it must return a String identifying the location of a file whose contents are identical to that produced by calling each; this may be used by the server as an alternative, possibly more efficient way to transport the response. The Body commonly is an Array of Strings, the application instance itself, or a File-like object.

http://www.rubydoc.info/github/rack/rack/file/SPEC#The_Body

Since Bullet may replace the response body it must call close on the previous response body.

wagenet avatar Apr 04 '18 21:04 wagenet