Skip to content

Commit 1477873

Browse files
committed
Streaming a file is a bit buggy, let's disable it and fix it later.
1 parent 01e6bcd commit 1477873

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lib/protocol/http/body/file.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ def read
6868
end
6969
end
7070

71-
def stream?
72-
true
73-
end
71+
# def stream?
72+
# true
73+
# end
7474

75-
def call(stream)
76-
IO.copy_stream(@file, stream, @remaining)
77-
ensure
78-
stream.close
79-
end
75+
# def call(stream)
76+
# IO.copy_stream(@file, stream, @remaining)
77+
# ensure
78+
# stream.close
79+
# end
8080

8181
def join
8282
return "" if @remaining == 0

test/protocol/http/body/file.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
let(:path) {File.expand_path('file_spec.txt', __dir__)}
1010
let(:body) {subject.open(path)}
1111

12-
with '#stream?' do
13-
it "should be streamable" do
14-
expect(body).to be(:stream?)
15-
end
16-
end
12+
# with '#stream?' do
13+
# it "should be streamable" do
14+
# expect(body).to be(:stream?)
15+
# end
16+
# end
1717

1818
with '#join' do
1919
it "should read entire file" do

0 commit comments

Comments
 (0)