diff options
Diffstat (limited to 'lib/yahns/http_response.rb')
-rw-r--r-- | lib/yahns/http_response.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb index 4b36db2..531194f 100644 --- a/lib/yahns/http_response.rb +++ b/lib/yahns/http_response.rb @@ -57,12 +57,12 @@ module Yahns::HttpResponse # :nodoc: "#{response_start}#{code} #{Rack::Utils::HTTP_STATUS_CODES[code]}\r\n\r\n" end - def response_header_blocked(ret, header, body, alive, offset, count) + def response_header_blocked(header, body, alive, offset, count) if body.respond_to?(:to_path) alive = Yahns::StreamFile.new(body, alive, offset, count) body = nil end - wbuf = Yahns::Wbuf.new(body, alive, self.class.output_buffer_tmpdir, ret) + wbuf = Yahns::Wbuf.new(body, alive, self.class.output_buffer_tmpdir) rv = wbuf.wbuf_write(self, header) if body && ! alive.respond_to?(:call) # skip body.each if hijacked body.each { |chunk| rv = wbuf.wbuf_write(self, chunk) } @@ -171,7 +171,7 @@ module Yahns::HttpResponse # :nodoc: when :wait_writable, :wait_readable # unlikely if k.output_buffering alive = hijack ? hijack : alive - rv = response_header_blocked(rv, buf, body, alive, offset, count) + rv = response_header_blocked(buf, body, alive, offset, count) body = nil # ensure we do not close body in ensure return rv else @@ -199,7 +199,7 @@ module Yahns::HttpResponse # :nodoc: chunk = rv # hope the skb grows when we loop into the trywrite when :wait_writable, :wait_readable if k.output_buffering - wbuf = Yahns::Wbuf.new(body, alive, k.output_buffer_tmpdir, rv) + wbuf = Yahns::Wbuf.new(body, alive, k.output_buffer_tmpdir) rv = wbuf.wbuf_write(self, chunk) break else |