diff options
Diffstat (limited to 'lib/rainbows')
-rw-r--r-- | lib/rainbows/ev_core.rb | 7 |
1 files changed, 2 insertions, 5 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 |