From 25904f92de4c456d99fe4210430d58296f84a0af Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 14 Sep 2015 05:33:14 +0000 Subject: response: avoid unnecessary args to IO.copy_stream Not all responses are seekable, so do not attempt to pass seek arguments to them since Ruby may attempt to seek (and fail!). --- lib/rainbows/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rainbows/response.rb b/lib/rainbows/response.rb index 8a0daf8..8d0de1d 100644 --- a/lib/rainbows/response.rb +++ b/lib/rainbows/response.rb @@ -129,7 +129,7 @@ module Rainbows::Response module CopyStream def write_body_file(body, range) range ? COPY_STREAM.copy_stream(body, self, range[1], range[0]) : - COPY_STREAM.copy_stream(body, self, nil, 0) + COPY_STREAM.copy_stream(body, self) end end include CopyStream -- cgit v1.2.3-24-ge0c7