diff --git a/lib/protocol/rack/body/streaming.rb b/lib/protocol/rack/body/streaming.rb index 0785b9c..879c660 100644 --- a/lib/protocol/rack/body/streaming.rb +++ b/lib/protocol/rack/body/streaming.rb @@ -41,6 +41,14 @@ def read end end + def empty? + if @input + @input.empty? + else + true + end + end + # Invokes the block in a fiber which yields chunks when they are available. def read @output ||= Output.new(@input, @block)