diff options
-rw-r--r-- | lib/rainbows/ev_core.rb | 7 | ||||
-rw-r--r-- | rainbows.gemspec | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb index f90e1e1..2679b5a 100644 --- a/lib/rainbows/ev_core.rb +++ b/lib/rainbows/ev_core.rb @@ -1,7 +1,5 @@ # -*- encoding: binary -*- -require 'tempfile' - module Rainbows # base module for evented models like Rev and EventMachine @@ -56,8 +54,7 @@ module Rainbows write(EXPECT_100_RESPONSE) @env.delete(HTTP_EXPECT) end - @input = len && len <= MAX_BODY ? - StringIO.new("") : Tempfile.new(nil).binmode + @input = len && len <= MAX_BODY ? StringIO.new("") : Util.tmpio @hp.filter_body(@buf2 = @buf.dup, @buf) @input << @buf2 on_read("") @@ -74,7 +71,7 @@ module Rainbows when :trailers if @hp.trailers(@env, @buf << data) app_call - @input.close! if Tempfile === @input + @input.close if File === @input end end rescue Object => e diff --git a/rainbows.gemspec b/rainbows.gemspec index dea8603..9237dfc 100644 --- a/rainbows.gemspec +++ b/rainbows.gemspec @@ -41,7 +41,7 @@ Gem::Specification.new do |s| s.test_files = test_files # we need Unicorn for the HTTP parser and process management - s.add_dependency(%q<unicorn>, ["~> 0.93.5"]) + s.add_dependency(%q<unicorn>, ["~> 0.94.0"]) # Unicorn already depends on Rack # s.add_dependency(%q<rack>) |