about summary refs log tree commit homepage
path: root/lib/yahns/http_response.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-06 05:00:11 +0000
committerEric Wong <e@80x24.org>2016-06-06 05:00:11 +0000
commit133523706715b6e95d2bf410886560f21a23b1e8 (patch)
tree64784f3e72c166fe05f5fe43a544fccaf8688191 /lib/yahns/http_response.rb
parent9f00d864e25e35ae6cb223b66a434965b14dbdca (diff)
downloadyahns-133523706715b6e95d2bf410886560f21a23b1e8.tar.gz
We can retrieve it when we actually need to create the
temporary file.  This saves an ivar slot and method dispatch
parameters.

This patch is nice, unfortunately the patch which follows is
not :P
Diffstat (limited to 'lib/yahns/http_response.rb')
-rw-r--r--lib/yahns/http_response.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb
index 531194f..d957df6 100644
--- a/lib/yahns/http_response.rb
+++ b/lib/yahns/http_response.rb
@@ -62,7 +62,7 @@ module Yahns::HttpResponse # :nodoc:
       alive = Yahns::StreamFile.new(body, alive, offset, count)
       body = nil
     end
-    wbuf = Yahns::Wbuf.new(body, alive, self.class.output_buffer_tmpdir)
+    wbuf = Yahns::Wbuf.new(body, alive)
     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) }
@@ -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)
+            wbuf = Yahns::Wbuf.new(body, alive)
             rv = wbuf.wbuf_write(self, chunk)
             break
           else