lib/protocol/http/body/deflate.rb in protocol-http-0.23.11 vs lib/protocol/http/body/deflate.rb in protocol-http-0.23.12

- old
+ new

@@ -87,9 +87,15 @@ class Deflate < ZStream def self.for(body, window_size = GZIP, level = DEFAULT_LEVEL) self.new(body, Zlib::Deflate.new(level, window_size)) end + def stream? + # We might want to revisit this design choice. + # We could wrap the streaming body in a Deflate stream, but that would require an extra stream wrapper which we don't have right now. See also `Digestable#stream?`. + false + end + def read return if @stream.finished? # The stream might have been closed while waiting for the chunk to come in. if chunk = super \ No newline at end of file