about summary refs log tree commit homepage
path: root/lib/yahns/http_client.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-05-09 08:51:52 +0000
committerEric Wong <e@80x24.org>2015-05-09 09:28:12 +0000
commitbcdcea2e06a171e77a88770875ef6b91d7ab3ca3 (patch)
tree7fdedf02e9b6a08f37209408919c1eef9a67a216 /lib/yahns/http_client.rb
parent690d893af45bce8ac36f8fb739400ee0ff166d2e (diff)
downloadyahns-bcdcea2e06a171e77a88770875ef6b91d7ab3ca3.tar.gz
Rack::TempfileReaper was added in rack 1.6 to cleanup temporary
files.  Make Yahns::TmpIO ducktype-compatible and put it into
env['rack.tempfiles'] array so Rack::TempfileReaper may be used to
free up space used by temporary buffer files.

ref: commit 3bdf5481e49d76b4502c51e5bdd93f68bfd1f0b4 in unicorn
Diffstat (limited to 'lib/yahns/http_client.rb')
-rw-r--r--lib/yahns/http_client.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/http_client.rb b/lib/yahns/http_client.rb
index a0fd5a4..620e925 100644
--- a/lib/yahns/http_client.rb
+++ b/lib/yahns/http_client.rb
@@ -57,7 +57,7 @@ class Yahns::HttpClient < Kgio::Socket # :nodoc:
             "Content-Length:#{len} too large (>#{mbs})", []
     end
     @state = :body
-    @input = k.tmpio_for(len)
+    @input = k.tmpio_for(len, @hs.env)
 
     rbuf = Thread.current[:yahns_rbuf]
     @hs.filter_body(rbuf, @hs.buf)