Rainbows! Rack HTTP server user/dev discussion
 help / Atom feed
From: Eric Wong <e@80x24.org>
To: rainbows-public@bogomips.org
Subject: [PATCH 2/6] response: avoid unnecessary args to IO.copy_stream
Date: Mon, 14 Sep 2015 05:33:14 +0000
Message-ID: <20150914053318.12251-3-e@80x24.org> (raw)
In-Reply-To: <20150914053318.12251-1-e@80x24.org>

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
-- 
EW


  parent reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14  5:33 [PATCH 0/6] misc updates for Ruby-trunk and gem changes Eric Wong
2015-09-14  5:33 ` [PATCH 1/6] build: fix quoting issue with double parens Eric Wong
2015-09-14  5:33 ` Eric Wong [this message]
2015-09-14  5:33 ` [PATCH 3/6] t/close-has-env.ru: ensure close is idempotent Eric Wong
2015-09-14  5:33 ` [PATCH 4/6] sync_close: This fix breakage from Ruby-trunk r50118 Eric Wong
2015-09-14  5:33 ` [PATCH 5/6] t/t0044-autopush.sh: remove test Eric Wong
2016-12-24 22:04   ` Eric Wong
2015-09-14  5:33 ` [PATCH 6/6] t/test_isolate.rb: updates for various gem versions Eric Wong

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://bogomips.org/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150914053318.12251-3-e@80x24.org \
    --to=e@80x24.org \
    --cc=rainbows-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Rainbows! Rack HTTP server user/dev discussion

Archives are clonable:
	git clone --mirror https://bogomips.org/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.rainbows

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox