about summary refs log tree commit homepage
path: root/lib/yahns/http_context.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-10-18 17:54:43 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-18 17:54:43 +0000
commit4b7ffee7c2436b1839146fd124e731a63f20d03e (patch)
treea036099c5b9b36e71e2fe6482b2059f7f4b5341a /lib/yahns/http_context.rb
parentec8bb4033257fd36ca93ba746c41abc1bd0175b6 (diff)
downloadyahns-4b7ffee7c2436b1839146fd124e731a63f20d03e.tar.gz
Since we are smarter about closing @input, we can just call
.close on it as closing inputs is forbidden in Rack apps,
anyways.  This reduces our class count and should make
things easier to follow.
Diffstat (limited to 'lib/yahns/http_context.rb')
-rw-r--r--lib/yahns/http_context.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/yahns/http_context.rb b/lib/yahns/http_context.rb
index 1af41df..97a0f82 100644
--- a/lib/yahns/http_context.rb
+++ b/lib/yahns/http_context.rb
@@ -1,7 +1,6 @@
 # -*- encoding: binary -*-
 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
-require 'yahns/tiny_input'
 
 # subclasses of Yahns::HttpClient will class extend this
 
@@ -61,6 +60,6 @@ module Yahns::HttpContext # :nodoc:
 
   def tmpio_for(len)
     len && len <= @client_body_buffer_size ?
-      Yahns::TinyInput.new("") : Yahns::TmpIO.new
+      StringIO.new("") : Yahns::TmpIO.new
   end
 end