about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-05-11 23:58:08 +0000
committerEric Wong <e@80x24.org>2015-05-12 00:28:59 +0000
commit313b0236c03eebd9f8074b11ff0b1778e22a87d4 (patch)
tree47719efc7711f76b16644dcca3a053f179e8c71c /lib
parent65e50864082a99af2ecc03132d5b9c9a8a878c27 (diff)
downloadyahns-313b0236c03eebd9f8074b11ff0b1778e22a87d4.tar.gz
It does not release memory immediately and GC can handle it
reliably, so don't waste a constant lookup + cache entry on it.

While we're at it, explain why we can't do a simpler
respond_to? check instead.
Diffstat (limited to 'lib')
-rw-r--r--lib/yahns/proxy_pass.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/yahns/proxy_pass.rb b/lib/yahns/proxy_pass.rb
index 7bbab51..15c9f53 100644
--- a/lib/yahns/proxy_pass.rb
+++ b/lib/yahns/proxy_pass.rb
@@ -149,8 +149,10 @@ class Yahns::ProxyPass # :nodoc:
     end
 
     def close_req_body(input)
+      # we cannot use respond_to?(:close) here since Rack::Lint::InputWrapper
+      # tries to prevent that (and hijack means all Rack specs go out the door)
       case input
-      when Yahns::TeeInput, IO, StringIO
+      when Yahns::TeeInput, IO
         input.close
       end
     end