lib/protocol/http/body/file.rb in protocol-http-0.33.0 vs lib/protocol/http/body/file.rb in protocol-http-0.34.0
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
# Released under the MIT License.
-# Copyright, 2019-2023, by Samuel Williams.
+# Copyright, 2019-2024, by Samuel Williams.
require_relative 'readable'
module Protocol
module HTTP
@@ -66,16 +66,18 @@
return chunk
end
end
end
- def stream?
- true
- end
+ # def stream?
+ # true
+ # end
- def call(stream)
- IO.copy_stream(@file, stream, @remaining)
- end
+ # def call(stream)
+ # IO.copy_stream(@file, stream, @remaining)
+ # ensure
+ # stream.close
+ # end
def join
return "" if @remaining == 0
buffer = @file.read(@remaining)